chrome_render_widget_host_view_mac_delegate.h revision 46d4c2bc3267f3f028f39e7e311b0f89aba2e4fd
1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_WIDGET_HOST_VIEW_MAC_DELEGATE_H_ 6#define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_WIDGET_HOST_VIEW_MAC_DELEGATE_H_ 7 8#import <Cocoa/Cocoa.h> 9 10#include "base/mac/scoped_nsobject.h" 11#include "base/memory/scoped_ptr.h" 12#import "content/public/browser/render_widget_host_view_mac_delegate.h" 13 14namespace content { 15class RenderWidgetHost; 16} 17 18namespace ChromeRenderWidgetHostViewMacDelegateInternal { 19class SpellCheckObserver; 20} 21 22@class HistorySwiper; 23@interface ChromeRenderWidgetHostViewMacDelegate 24 : NSObject<RenderWidgetHostViewMacDelegate> { 25 @private 26 content::RenderWidgetHost* renderWidgetHost_; // weak 27 scoped_ptr<ChromeRenderWidgetHostViewMacDelegateInternal::SpellCheckObserver> 28 spellingObserver_; 29 30 // Used for continuous spell checking. 31 BOOL spellcheckEnabled_; 32 BOOL spellcheckChecked_; 33 34 // Responsible for 2-finger swipes history navigation. 35 base::scoped_nsobject<HistorySwiper> historySwiper_; 36} 37 38- (id)initWithRenderWidgetHost:(content::RenderWidgetHost*)renderWidgetHost; 39 40- (void)viewGone:(NSView*)view; 41- (BOOL)handleEvent:(NSEvent*)event; 42- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right; 43- (void)setHasHorizontalScrollbar:(BOOL)hasHorizontalScrollbar; 44- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item 45 isValidItem:(BOOL*)valid; 46@end 47 48#endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_WIDGET_HOST_VIEW_MAC_DELEGATE_H_ 49