| 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. Set to |NO| at |
| 122 // the start of a scroll gesture, and then to |YES| if a scroll event comes |
| 123 // back unhandled from the renderer. |
| 124 // Used for history swiping. |
| 125 BOOL gotUnhandledWheelEvent_; |
| 126 |
| 127 // Cummulative scroll delta since scroll gesture start. Only valid during |
| 128 // scroll gesture handling. Used for history swiping. |
| 129 NSSize totalScrollDelta_; |
| 130 |
| 131 // If the viewport is scrolled all the way to the left or right. |
| 132 // Used for history swiping. |
| 133 BOOL isPinnedLeft_; |
| 134 BOOL isPinnedRight_; |
| 135 |
| 136 // If the main frame has a horizontal scrollbar. |
| 137 // Used for history swiping. |
| 138 BOOL hasHorizontalScrollbar_; |
| 120 } | 139 } |
| 121 | 140 |
| 122 @property(nonatomic, readonly) NSRange selectedRange; | 141 @property(nonatomic, readonly) NSRange selectedRange; |
| 142 @property(nonatomic) BOOL gotUnhandledWheelEvent; |
| 143 @property(nonatomic, setter=setPinnedLeft:) BOOL isPinnedLeft; |
| 144 @property(nonatomic, setter=setPinnedRight:) BOOL isPinnedRight; |
| 145 @property(nonatomic) BOOL hasHorizontalScrollbar; |
| 123 | 146 |
| 124 - (void)setCanBeKeyView:(BOOL)can; | 147 - (void)setCanBeKeyView:(BOOL)can; |
| 125 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; | 148 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; |
| 126 - (void)setCloseOnDeactivate:(BOOL)b; | 149 - (void)setCloseOnDeactivate:(BOOL)b; |
| 127 - (void)setToolTipAtMousePoint:(NSString *)string; | 150 - (void)setToolTipAtMousePoint:(NSString *)string; |
| 128 // Set frame, then notify the RenderWidgetHost that the frame has been changed, | 151 // Set frame, then notify the RenderWidgetHost that the frame has been changed, |
| 129 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. | 152 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. |
| 130 // This stops the flickering issue in http://crbug.com/31970 | 153 // This stops the flickering issue in http://crbug.com/31970 |
| 131 - (void)setFrameWithDeferredUpdate:(NSRect)frame; | 154 - (void)setFrameWithDeferredUpdate:(NSRect)frame; |
| 132 // Notify the RenderWidgetHost that the frame was updated so it can resize | 155 // 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( | 296 void DrawAcceleratedSurfaceInstance( |
| 274 CGLContextObj context, | 297 CGLContextObj context, |
| 275 gfx::PluginWindowHandle plugin_handle, | 298 gfx::PluginWindowHandle plugin_handle, |
| 276 NSSize size); | 299 NSSize size); |
| 277 // Forces the textures associated with any accelerated plugin instances | 300 // Forces the textures associated with any accelerated plugin instances |
| 278 // to be reloaded. | 301 // to be reloaded. |
| 279 void ForceTextureReload(); | 302 void ForceTextureReload(); |
| 280 | 303 |
| 281 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate); | 304 virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate); |
| 282 | 305 |
| 306 virtual void UnhandledWheelEvent( |
| 307 const WebKit::WebMouseWheelEvent& event) OVERRIDE; |
| 308 virtual void SetHasHorizontalScrollbar( |
| 309 bool has_horizontal_scrollbar) OVERRIDE; |
| 310 virtual void SetScrollOffsetPinning( |
| 311 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; |
| 312 |
| 283 void KillSelf(); | 313 void KillSelf(); |
| 284 | 314 |
| 285 void SetTextInputActive(bool active); | 315 void SetTextInputActive(bool active); |
| 286 | 316 |
| 287 // Sends completed plugin IME notification and text back to the renderer. | 317 // Sends completed plugin IME notification and text back to the renderer. |
| 288 void PluginImeCompositionCompleted(const string16& text, int plugin_id); | 318 void PluginImeCompositionCompleted(const string16& text, int plugin_id); |
| 289 | 319 |
| 290 const std::string& selected_text() const { return selected_text_; } | 320 const std::string& selected_text() const { return selected_text_; } |
| 291 | 321 |
| 292 void UpdateRootGpuViewVisibility(bool show_gpu_widget); | 322 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 | 421 // 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. | 422 // set when the gpu widget needs to be hidden once a paint is completed. |
| 393 bool needs_gpu_visibility_update_after_repaint_; | 423 bool needs_gpu_visibility_update_after_repaint_; |
| 394 | 424 |
| 395 gfx::PluginWindowHandle compositing_surface_; | 425 gfx::PluginWindowHandle compositing_surface_; |
| 396 | 426 |
| 397 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 427 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 398 }; | 428 }; |
| 399 | 429 |
| 400 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 430 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |