| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 bool has_focus() const { return has_focus_; } | 369 bool has_focus() const { return has_focus_; } |
| 370 | 370 |
| 371 MouseLockDispatcher* mouse_lock_dispatcher() { | 371 MouseLockDispatcher* mouse_lock_dispatcher() { |
| 372 return mouse_lock_dispatcher_.get(); | 372 return mouse_lock_dispatcher_.get(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) { | 375 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) { |
| 376 focused_pepper_plugin_ = plugin; | 376 focused_pepper_plugin_ = plugin; |
| 377 } | 377 } |
| 378 | 378 |
| 379 // When emulated, this returns original device scale factor. |
| 380 float GetOriginalDeviceScaleFactor() const; |
| 381 |
| 379 protected: | 382 protected: |
| 380 // Friend RefCounted so that the dtor can be non-public. Using this class | 383 // Friend RefCounted so that the dtor can be non-public. Using this class |
| 381 // without ref-counting is an error. | 384 // without ref-counting is an error. |
| 382 friend class base::RefCounted<RenderWidget>; | 385 friend class base::RefCounted<RenderWidget>; |
| 383 | 386 |
| 384 // For unit tests. | 387 // For unit tests. |
| 385 friend class RenderWidgetTest; | 388 friend class RenderWidgetTest; |
| 386 | 389 |
| 387 enum ResizeAck { | 390 enum ResizeAck { |
| 388 SEND_RESIZE_ACK, | 391 SEND_RESIZE_ACK, |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 std::unique_ptr<blink::scheduler::RenderWidgetSchedulingState> | 777 std::unique_ptr<blink::scheduler::RenderWidgetSchedulingState> |
| 775 render_widget_scheduling_state_; | 778 render_widget_scheduling_state_; |
| 776 | 779 |
| 777 // Mouse Lock dispatcher attached to this view. | 780 // Mouse Lock dispatcher attached to this view. |
| 778 std::unique_ptr<RenderWidgetMouseLockDispatcher> mouse_lock_dispatcher_; | 781 std::unique_ptr<RenderWidgetMouseLockDispatcher> mouse_lock_dispatcher_; |
| 779 | 782 |
| 780 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. | 783 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
| 781 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; | 784 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
| 782 | 785 |
| 783 private: | 786 private: |
| 784 // When emulated, this returns original device scale factor. | |
| 785 float GetOriginalDeviceScaleFactor() const; | |
| 786 | |
| 787 // Indicates whether this widget has focus. | 787 // Indicates whether this widget has focus. |
| 788 bool has_focus_; | 788 bool has_focus_; |
| 789 | 789 |
| 790 // This reference is set by the RenderFrame and is used to query the IME- | 790 // This reference is set by the RenderFrame and is used to query the IME- |
| 791 // related state from the plugin to later send to the browser. | 791 // related state from the plugin to later send to the browser. |
| 792 PepperPluginInstanceImpl* focused_pepper_plugin_; | 792 PepperPluginInstanceImpl* focused_pepper_plugin_; |
| 793 | 793 |
| 794 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 794 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 795 }; | 795 }; |
| 796 | 796 |
| 797 } // namespace content | 797 } // namespace content |
| 798 | 798 |
| 799 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 799 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |