Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 1008993002: Protoype Mac input event filter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurfaceAPI.h> 9 #include <IOSurface/IOSurfaceAPI.h>
10 #include <list> 10 #include <list>
(...skipping 17 matching lines...) Expand all
28 #import "content/public/browser/render_widget_host_view_mac_base.h" 28 #import "content/public/browser/render_widget_host_view_mac_base.h"
29 #include "ipc/ipc_sender.h" 29 #include "ipc/ipc_sender.h"
30 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 30 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
31 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" 31 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
32 #include "ui/accelerated_widget_mac/io_surface_layer.h" 32 #include "ui/accelerated_widget_mac/io_surface_layer.h"
33 #include "ui/base/cocoa/base_view.h" 33 #include "ui/base/cocoa/base_view.h"
34 #include "ui/base/cocoa/remote_layer_api.h" 34 #include "ui/base/cocoa/remote_layer_api.h"
35 #include "ui/gfx/display_observer.h" 35 #include "ui/gfx/display_observer.h"
36 36
37 namespace content { 37 namespace content {
38 class RenderWidgetHostImpl;
38 class RenderWidgetHostViewMac; 39 class RenderWidgetHostViewMac;
39 class RenderWidgetHostViewMacEditCommandHelper; 40 class RenderWidgetHostViewMacEditCommandHelper;
40 class WebContents; 41 class WebContents;
42 class WheelEventRailFilterMac;
41 } 43 }
42 44
43 namespace ui { 45 namespace ui {
44 class Compositor; 46 class Compositor;
45 class Layer; 47 class Layer;
46 } 48 }
47 49
48 @class FullscreenWindowManager; 50 @class FullscreenWindowManager;
49 @protocol RenderWidgetHostViewMacDelegate; 51 @protocol RenderWidgetHostViewMacDelegate;
50 @class ToolTip; 52 @class ToolTip;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId; 194 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId;
193 // Evaluates the event in the context of plugin IME, if plugin IME is enabled. 195 // Evaluates the event in the context of plugin IME, if plugin IME is enabled.
194 // Returns YES if the event was handled. 196 // Returns YES if the event was handled.
195 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event; 197 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event;
196 - (void)updateCursor:(NSCursor*)cursor; 198 - (void)updateCursor:(NSCursor*)cursor;
197 - (NSRect)firstViewRectForCharacterRange:(NSRange)theRange 199 - (NSRect)firstViewRectForCharacterRange:(NSRange)theRange
198 actualRange:(NSRangePointer)actualRange; 200 actualRange:(NSRangePointer)actualRange;
199 @end 201 @end
200 202
201 namespace content { 203 namespace content {
202 class RenderWidgetHostImpl;
203 204
204 /////////////////////////////////////////////////////////////////////////////// 205 ///////////////////////////////////////////////////////////////////////////////
205 // RenderWidgetHostViewMac 206 // RenderWidgetHostViewMac
206 // 207 //
207 // An object representing the "View" of a rendered web page. This object is 208 // An object representing the "View" of a rendered web page. This object is
208 // responsible for displaying the content of the web page, and integrating with 209 // responsible for displaying the content of the web page, and integrating with
209 // the Cocoa view system. It is the implementation of the RenderWidgetHostView 210 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
210 // that the cross-platform RenderWidgetHost object uses 211 // that the cross-platform RenderWidgetHost object uses
211 // to display the data. 212 // to display the data.
212 // 213 //
(...skipping 17 matching lines...) Expand all
230 // 231 //
231 // When |is_guest_view_hack| is true, this view isn't really the view for 232 // When |is_guest_view_hack| is true, this view isn't really the view for
232 // the |widget|, a RenderWidgetHostViewGuest is. 233 // the |widget|, a RenderWidgetHostViewGuest is.
233 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated 234 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
234 // to use RWHVChildFrame (http://crbug.com/330264). 235 // to use RWHVChildFrame (http://crbug.com/330264).
235 RenderWidgetHostViewMac(RenderWidgetHost* widget, bool is_guest_view_hack); 236 RenderWidgetHostViewMac(RenderWidgetHost* widget, bool is_guest_view_hack);
236 ~RenderWidgetHostViewMac() override; 237 ~RenderWidgetHostViewMac() override;
237 238
238 RenderWidgetHostViewCocoa* cocoa_view() const { return cocoa_view_; } 239 RenderWidgetHostViewCocoa* cocoa_view() const { return cocoa_view_; }
239 240
241 scoped_ptr<WheelEventRailFilterMac> wheel_event_rail_filter_;
242
240 // |delegate| is used to separate out the logic from the NSResponder delegate. 243 // |delegate| is used to separate out the logic from the NSResponder delegate.
241 // |delegate| is retained by this class. 244 // |delegate| is retained by this class.
242 // |delegate| should be set at most once. 245 // |delegate| should be set at most once.
243 CONTENT_EXPORT void SetDelegate( 246 CONTENT_EXPORT void SetDelegate(
244 NSObject<RenderWidgetHostViewMacDelegate>* delegate); 247 NSObject<RenderWidgetHostViewMacDelegate>* delegate);
245 void SetAllowPauseForResizeOrRepaint(bool allow); 248 void SetAllowPauseForResizeOrRepaint(bool allow);
246 249
247 // RenderWidgetHostView implementation. 250 // RenderWidgetHostView implementation.
248 bool OnMessageReceived(const IPC::Message& msg) override; 251 bool OnMessageReceived(const IPC::Message& msg) override;
249 void InitAsChild(gfx::NativeView parent_view) override; 252 void InitAsChild(gfx::NativeView parent_view) override;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 577
575 // Factory used to safely scope delayed calls to ShutdownHost(). 578 // Factory used to safely scope delayed calls to ShutdownHost().
576 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 579 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
577 580
578 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 581 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
579 }; 582 };
580 583
581 } // namespace content 584 } // namespace content
582 585
583 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 586 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698