| OLD | NEW |
| 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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 namespace scheduler { | 79 namespace scheduler { |
| 80 class RenderWidgetSchedulingState; | 80 class RenderWidgetSchedulingState; |
| 81 } | 81 } |
| 82 | 82 |
| 83 namespace content { | 83 namespace content { |
| 84 class CompositorDependencies; | 84 class CompositorDependencies; |
| 85 class ExternalPopupMenu; | 85 class ExternalPopupMenu; |
| 86 class FrameSwapMessageQueue; | 86 class FrameSwapMessageQueue; |
| 87 class ImeEventGuard; | 87 class ImeEventGuard; |
| 88 class PepperPluginInstanceImpl; |
| 88 class RenderFrameImpl; | 89 class RenderFrameImpl; |
| 89 class RenderFrameProxy; | 90 class RenderFrameProxy; |
| 90 class RenderWidgetCompositor; | 91 class RenderWidgetCompositor; |
| 91 class RenderWidgetOwnerDelegate; | 92 class RenderWidgetOwnerDelegate; |
| 92 class RenderWidgetScreenMetricsEmulator; | 93 class RenderWidgetScreenMetricsEmulator; |
| 93 class ResizingModeSelector; | 94 class ResizingModeSelector; |
| 94 struct ContextMenuParams; | 95 struct ContextMenuParams; |
| 95 struct DidOverscrollParams; | 96 struct DidOverscrollParams; |
| 96 struct ResizeParams; | 97 struct ResizeParams; |
| 97 | 98 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // Called when the Widget has changed size as a result of an auto-resize. | 361 // Called when the Widget has changed size as a result of an auto-resize. |
| 361 void DidAutoResize(const gfx::Size& new_size); | 362 void DidAutoResize(const gfx::Size& new_size); |
| 362 | 363 |
| 363 // Indicates whether this widget has focus. | 364 // Indicates whether this widget has focus. |
| 364 bool has_focus() const { return has_focus_; } | 365 bool has_focus() const { return has_focus_; } |
| 365 | 366 |
| 366 MouseLockDispatcher* mouse_lock_dispatcher() { | 367 MouseLockDispatcher* mouse_lock_dispatcher() { |
| 367 return mouse_lock_dispatcher_.get(); | 368 return mouse_lock_dispatcher_.get(); |
| 368 } | 369 } |
| 369 | 370 |
| 371 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) { |
| 372 focused_pepper_plugin_ = plugin; |
| 373 } |
| 374 |
| 370 protected: | 375 protected: |
| 371 // Friend RefCounted so that the dtor can be non-public. Using this class | 376 // Friend RefCounted so that the dtor can be non-public. Using this class |
| 372 // without ref-counting is an error. | 377 // without ref-counting is an error. |
| 373 friend class base::RefCounted<RenderWidget>; | 378 friend class base::RefCounted<RenderWidget>; |
| 374 | 379 |
| 375 // For unit tests. | 380 // For unit tests. |
| 376 friend class RenderWidgetTest; | 381 friend class RenderWidgetTest; |
| 377 | 382 |
| 378 enum ResizeAck { | 383 enum ResizeAck { |
| 379 SEND_RESIZE_ACK, | 384 SEND_RESIZE_ACK, |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. | 769 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
| 765 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; | 770 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
| 766 | 771 |
| 767 private: | 772 private: |
| 768 // When emulated, this returns original device scale factor. | 773 // When emulated, this returns original device scale factor. |
| 769 float GetOriginalDeviceScaleFactor() const; | 774 float GetOriginalDeviceScaleFactor() const; |
| 770 | 775 |
| 771 // Indicates whether this widget has focus. | 776 // Indicates whether this widget has focus. |
| 772 bool has_focus_; | 777 bool has_focus_; |
| 773 | 778 |
| 779 // This reference is set by the RenderFrame and is used to query the IME- |
| 780 // related state from the plugin to later send to the browser. |
| 781 PepperPluginInstanceImpl* focused_pepper_plugin_; |
| 782 |
| 774 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 783 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 775 }; | 784 }; |
| 776 | 785 |
| 777 } // namespace content | 786 } // namespace content |
| 778 | 787 |
| 779 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 788 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |