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

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

Issue 1019153002: Mac: Add rails for scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/fabsf/std::abs/g 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
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 MouseWheelRailsFilterMac;
39 class RenderWidgetHostImpl;
38 class RenderWidgetHostViewMac; 40 class RenderWidgetHostViewMac;
39 class RenderWidgetHostViewMacEditCommandHelper; 41 class RenderWidgetHostViewMacEditCommandHelper;
40 class WebContents; 42 class WebContents;
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
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // If true then escape key down events are suppressed until the first escape 166 // If true then escape key down events are suppressed until the first escape
165 // key up event. (The up event is suppressed as well). This is used by the 167 // key up event. (The up event is suppressed as well). This is used by the
166 // flash fullscreen code to avoid sending a key up event without a matching 168 // flash fullscreen code to avoid sending a key up event without a matching
167 // key down event. 169 // key down event.
168 BOOL suppressNextEscapeKeyUp_; 170 BOOL suppressNextEscapeKeyUp_;
169 171
170 // The set of key codes from key down events that we haven't seen the matching 172 // The set of key codes from key down events that we haven't seen the matching
171 // key up events yet. 173 // key up events yet.
172 // Used for filtering out non-matching NSKeyUp events. 174 // Used for filtering out non-matching NSKeyUp events.
173 std::set<unsigned short> keyDownCodes_; 175 std::set<unsigned short> keyDownCodes_;
176
177 // The filter used to guide touch events towards a horizontal or vertical
178 // orientation.
179 scoped_ptr<content::MouseWheelRailsFilterMac> mouseWheelFilter_;
tdresser 2015/03/19 13:03:41 Why use a scoped_ptr here? It doesn't need to be n
ccameron 2015/03/19 19:33:14 True -- done.
174 } 180 }
175 181
176 @property(nonatomic, readonly) NSRange selectedRange; 182 @property(nonatomic, readonly) NSRange selectedRange;
177 @property(nonatomic, readonly) BOOL suppressNextEscapeKeyUp; 183 @property(nonatomic, readonly) BOOL suppressNextEscapeKeyUp;
178 184
179 - (void)setCanBeKeyView:(BOOL)can; 185 - (void)setCanBeKeyView:(BOOL)can;
180 - (void)setCloseOnDeactivate:(BOOL)b; 186 - (void)setCloseOnDeactivate:(BOOL)b;
181 - (void)setOpaque:(BOOL)opaque; 187 - (void)setOpaque:(BOOL)opaque;
182 - (void)setToolTipAtMousePoint:(NSString *)string; 188 - (void)setToolTipAtMousePoint:(NSString *)string;
183 // True for always-on-top special windows (e.g. Balloons and Panels). 189 // True for always-on-top special windows (e.g. Balloons and Panels).
184 - (BOOL)acceptsMouseEventsWhenInactive; 190 - (BOOL)acceptsMouseEventsWhenInactive;
185 // Cancel ongoing composition (abandon the marked text). 191 // Cancel ongoing composition (abandon the marked text).
186 - (void)cancelComposition; 192 - (void)cancelComposition;
187 // Confirm ongoing composition. 193 // Confirm ongoing composition.
188 - (void)confirmComposition; 194 - (void)confirmComposition;
189 // Enables or disables plugin IME. 195 // Enables or disables plugin IME.
190 - (void)setPluginImeActive:(BOOL)active; 196 - (void)setPluginImeActive:(BOOL)active;
191 // Updates the current plugin focus state. 197 // Updates the current plugin focus state.
192 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId; 198 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId;
193 // Evaluates the event in the context of plugin IME, if plugin IME is enabled. 199 // Evaluates the event in the context of plugin IME, if plugin IME is enabled.
194 // Returns YES if the event was handled. 200 // Returns YES if the event was handled.
195 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event; 201 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event;
196 - (void)updateCursor:(NSCursor*)cursor; 202 - (void)updateCursor:(NSCursor*)cursor;
197 - (NSRect)firstViewRectForCharacterRange:(NSRange)theRange 203 - (NSRect)firstViewRectForCharacterRange:(NSRange)theRange
198 actualRange:(NSRangePointer)actualRange; 204 actualRange:(NSRangePointer)actualRange;
199 @end 205 @end
200 206
201 namespace content { 207 namespace content {
202 class RenderWidgetHostImpl;
203 208
204 /////////////////////////////////////////////////////////////////////////////// 209 ///////////////////////////////////////////////////////////////////////////////
205 // RenderWidgetHostViewMac 210 // RenderWidgetHostViewMac
206 // 211 //
207 // An object representing the "View" of a rendered web page. This object is 212 // 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 213 // responsible for displaying the content of the web page, and integrating with
209 // the Cocoa view system. It is the implementation of the RenderWidgetHostView 214 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
210 // that the cross-platform RenderWidgetHost object uses 215 // that the cross-platform RenderWidgetHost object uses
211 // to display the data. 216 // to display the data.
212 // 217 //
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 579
575 // Factory used to safely scope delayed calls to ShutdownHost(). 580 // Factory used to safely scope delayed calls to ShutdownHost().
576 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 581 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
577 582
578 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 583 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
579 }; 584 };
580 585
581 } // namespace content 586 } // namespace content
582 587
583 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 588 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698