Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / renderer_host / chrome_render_widget_host_view_mac_delegate.h
blob048446c0daef7ecbaaf78ed48ac180448267ac03
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.
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_
8 #import <Cocoa/Cocoa.h>
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"
14 namespace content {
15 class RenderWidgetHost;
18 namespace ChromeRenderWidgetHostViewMacDelegateInternal {
19 class SpellCheckObserver;
22 @class HistorySwiper;
23 @interface ChromeRenderWidgetHostViewMacDelegate
24 : NSObject<RenderWidgetHostViewMacDelegate> {
25 @private
26 content::RenderWidgetHost* renderWidgetHost_; // weak
27 scoped_ptr<ChromeRenderWidgetHostViewMacDelegateInternal::SpellCheckObserver>
28 spellingObserver_;
30 // Used for continuous spell checking.
31 BOOL spellcheckEnabled_;
32 BOOL spellcheckChecked_;
34 // Responsible for 2-finger swipes history navigation.
35 base::scoped_nsobject<HistorySwiper> historySwiper_;
38 - (id)initWithRenderWidgetHost:(content::RenderWidgetHost*)renderWidgetHost;
40 - (BOOL)handleEvent:(NSEvent*)event;
41 - (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item
42 isValidItem:(BOOL*)valid;
43 @end
45 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_WIDGET_HOST_VIEW_MAC_DELEGATE_H_