OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 EditCommands editCommands_; | 110 EditCommands editCommands_; |
111 | 111 |
112 // The plugin that currently has focus (-1 if no plugin has focus). | 112 // The plugin that currently has focus (-1 if no plugin has focus). |
113 int focusedPluginIdentifier_; | 113 int focusedPluginIdentifier_; |
114 | 114 |
115 // Whether or not plugin IME is currently enabled active. | 115 // Whether or not plugin IME is currently enabled active. |
116 BOOL pluginImeActive_; | 116 BOOL pluginImeActive_; |
117 | 117 |
118 // Whether the previous mouse event was ignored due to hitTest check. | 118 // Whether the previous mouse event was ignored due to hitTest check. |
119 BOOL mouseEventWasIgnored_; | 119 BOOL mouseEventWasIgnored_; |
120 | |
121 // If a scroll event came back unhandled from the renderer. | |
122 // Used for history swiping. | |
123 BOOL gotUnhandledWheelEvent_; | |
Mark Mentovai
2011/08/15 14:43:57
Document which of these fields (I guess gotUnhandl
| |
124 | |
125 // Cummulative scroll delta since scroll gesture start. | |
126 // Used for history swiping. | |
127 NSSize totalScrollDelta_; | |
128 | |
129 // If the viewport is scrolled all the way to the left or right. | |
130 // Used for history swiping. | |
131 BOOL isPinnedLeft_; | |
132 BOOL isPinnedRight_; | |
133 | |
134 // If the main frame has a horizontal scrollbar. | |
135 // Used for history swiping. | |
136 BOOL hasHorizontalScrollbar_; | |
120 } | 137 } |
121 | 138 |
122 @property(nonatomic, readonly) NSRange selectedRange; | 139 @property(nonatomic, readonly) NSRange selectedRange; |
140 @property(nonatomic) BOOL gotUnhandledWheelEvent; | |
141 @property(nonatomic, setter=setPinnedLeft:) BOOL isPinnedLeft; | |
142 @property(nonatomic, setter=setPinnedRight:) BOOL isPinnedRight; | |
143 @property(nonatomic) BOOL hasHorizontalScrollbar; | |
123 | 144 |
124 - (void)setCanBeKeyView:(BOOL)can; | 145 - (void)setCanBeKeyView:(BOOL)can; |
125 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; | 146 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; |
126 - (void)setCloseOnDeactivate:(BOOL)b; | 147 - (void)setCloseOnDeactivate:(BOOL)b; |
127 - (void)setToolTipAtMousePoint:(NSString *)string; | 148 - (void)setToolTipAtMousePoint:(NSString *)string; |
128 // Set frame, then notify the RenderWidgetHost that the frame has been changed, | 149 // Set frame, then notify the RenderWidgetHost that the frame has been changed, |
129 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. | 150 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. |
130 // This stops the flickering issue in http://crbug.com/31970 | 151 // This stops the flickering issue in http://crbug.com/31970 |
131 - (void)setFrameWithDeferredUpdate:(NSRect)frame; | 152 - (void)setFrameWithDeferredUpdate:(NSRect)frame; |
132 // Notify the RenderWidgetHost that the frame was updated so it can resize | 153 // Notify the RenderWidgetHost that the frame was updated so it can resize |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 void DrawAcceleratedSurfaceInstance( | 294 void DrawAcceleratedSurfaceInstance( |
274 CGLContextObj context, | 295 CGLContextObj context, |
275 gfx::PluginWindowHandle plugin_handle, | 296 gfx::PluginWindowHandle plugin_handle, |
276 NSSize size); | 297 NSSize size); |
277 // Forces the textures associated with any accelerated plugin instances | 298 // Forces the textures associated with any accelerated plugin instances |
278 // to be reloaded. | 299 // to be reloaded. |
279 void ForceTextureReload(); | 300 void ForceTextureReload(); |
280 | 301 |
281 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate); | 302 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate); |
282 | 303 |
304 virtual void UnhandledWheelEvent( | |
305 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | |
306 virtual void SetHasHorizontalScrollbar( | |
307 bool has_horizontal_scrollbar) OVERRIDE; | |
308 virtual void SetScrollOffsetPinning( | |
309 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; | |
310 | |
283 void KillSelf(); | 311 void KillSelf(); |
284 | 312 |
285 void SetTextInputActive(bool active); | 313 void SetTextInputActive(bool active); |
286 | 314 |
287 // Sends completed plugin IME notification and text back to the renderer. | 315 // Sends completed plugin IME notification and text back to the renderer. |
288 void PluginImeCompositionCompleted(const string16& text, int plugin_id); | 316 void PluginImeCompositionCompleted(const string16& text, int plugin_id); |
289 | 317 |
290 const std::string& selected_text() const { return selected_text_; } | 318 const std::string& selected_text() const { return selected_text_; } |
291 | 319 |
292 void UpdateRootGpuViewVisibility(bool show_gpu_widget); | 320 void UpdateRootGpuViewVisibility(bool show_gpu_widget); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 // hidden until the software backing store has been updated. This variable is | 419 // hidden until the software backing store has been updated. This variable is |
392 // set when the gpu widget needs to be hidden once a paint is completed. | 420 // set when the gpu widget needs to be hidden once a paint is completed. |
393 bool needs_gpu_visibility_update_after_repaint_; | 421 bool needs_gpu_visibility_update_after_repaint_; |
394 | 422 |
395 gfx::PluginWindowHandle compositing_surface_; | 423 gfx::PluginWindowHandle compositing_surface_; |
396 | 424 |
397 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 425 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
398 }; | 426 }; |
399 | 427 |
400 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 428 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |