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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 class ImeEventGuard; | 86 class ImeEventGuard; |
87 class RenderFrameImpl; | 87 class RenderFrameImpl; |
88 class RenderFrameProxy; | 88 class RenderFrameProxy; |
89 class RenderWidgetCompositor; | 89 class RenderWidgetCompositor; |
90 class RenderWidgetOwnerDelegate; | 90 class RenderWidgetOwnerDelegate; |
91 class RenderWidgetScreenMetricsEmulator; | 91 class RenderWidgetScreenMetricsEmulator; |
92 class ResizingModeSelector; | 92 class ResizingModeSelector; |
93 struct ContextMenuParams; | 93 struct ContextMenuParams; |
94 struct DidOverscrollParams; | 94 struct DidOverscrollParams; |
95 struct ResizeParams; | 95 struct ResizeParams; |
96 struct WebPluginGeometry; | |
97 | 96 |
98 // RenderWidget provides a communication bridge between a WebWidget and | 97 // RenderWidget provides a communication bridge between a WebWidget and |
99 // a RenderWidgetHost, the latter of which lives in a different process. | 98 // a RenderWidgetHost, the latter of which lives in a different process. |
100 // | 99 // |
101 // RenderWidget is used to implement: | 100 // RenderWidget is used to implement: |
102 // - RenderViewImpl (deprecated) | 101 // - RenderViewImpl (deprecated) |
103 // - Fullscreen mode (RenderWidgetFullScreen) | 102 // - Fullscreen mode (RenderWidgetFullScreen) |
104 // - Popup "menus" (like the color chooser and date picker) | 103 // - Popup "menus" (like the color chooser and date picker) |
105 // - Widgets for frames (for out-of-process iframe support) | 104 // - Widgets for frames (for out-of-process iframe support) |
106 class CONTENT_EXPORT RenderWidget | 105 class CONTENT_EXPORT RenderWidget |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 const blink::WebNode& tapped_node, | 278 const blink::WebNode& tapped_node, |
280 bool page_changed) override; | 279 bool page_changed) override; |
281 #endif | 280 #endif |
282 | 281 |
283 // Begins the compositor's scheduler to start producing frames. | 282 // Begins the compositor's scheduler to start producing frames. |
284 void StartCompositor(); | 283 void StartCompositor(); |
285 | 284 |
286 // Stop compositing. | 285 // Stop compositing. |
287 void WillCloseLayerTreeView(); | 286 void WillCloseLayerTreeView(); |
288 | 287 |
289 // Called when a plugin is moved. These events are queued up and sent with | |
290 // the next paint or scroll message to the host. | |
291 void SchedulePluginMove(const WebPluginGeometry& move); | |
292 | |
293 // Called when a plugin window has been destroyed, to make sure the currently | |
294 // pending moves don't try to reference it. | |
295 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); | |
296 | |
297 RenderWidgetCompositor* compositor() const; | 288 RenderWidgetCompositor* compositor() const; |
298 | 289 |
299 const RenderWidgetInputHandler& input_handler() const { | 290 const RenderWidgetInputHandler& input_handler() const { |
300 return *input_handler_; | 291 return *input_handler_; |
301 } | 292 } |
302 | 293 |
303 void SetHandlingInputEventForTesting(bool handling_input_event); | 294 void SetHandlingInputEventForTesting(bool handling_input_event); |
304 | 295 |
305 // When paused in debugger, we send ack for mouse event early. This ensures | 296 // When paused in debugger, we send ack for mouse event early. This ensures |
306 // that we continue receiving mouse moves and pass them to debugger. Returns | 297 // that we continue receiving mouse moves and pass them to debugger. Returns |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 692 |
702 // Stores the current composition character bounds. | 693 // Stores the current composition character bounds. |
703 std::vector<gfx::Rect> composition_character_bounds_; | 694 std::vector<gfx::Rect> composition_character_bounds_; |
704 | 695 |
705 // Stores the current composition range. | 696 // Stores the current composition range. |
706 gfx::Range composition_range_; | 697 gfx::Range composition_range_; |
707 | 698 |
708 // The kind of popup this widget represents, NONE if not a popup. | 699 // The kind of popup this widget represents, NONE if not a popup. |
709 blink::WebPopupType popup_type_; | 700 blink::WebPopupType popup_type_; |
710 | 701 |
711 // Holds all the needed plugin window moves for a scroll. | |
712 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector; | |
713 WebPluginGeometryVector plugin_window_moves_; | |
714 | |
715 // While we are waiting for the browser to update window sizes, we track the | 702 // While we are waiting for the browser to update window sizes, we track the |
716 // pending size temporarily. | 703 // pending size temporarily. |
717 int pending_window_rect_count_; | 704 int pending_window_rect_count_; |
718 blink::WebRect pending_window_rect_; | 705 blink::WebRect pending_window_rect_; |
719 | 706 |
720 // The screen rects of the view and the window that contains it. | 707 // The screen rects of the view and the window that contains it. |
721 gfx::Rect view_screen_rect_; | 708 gfx::Rect view_screen_rect_; |
722 gfx::Rect window_screen_rect_; | 709 gfx::Rect window_screen_rect_; |
723 | 710 |
724 scoped_ptr<RenderWidgetInputHandler> input_handler_; | 711 scoped_ptr<RenderWidgetInputHandler> input_handler_; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 private: | 775 private: |
789 // When emulated, this returns original device scale factor. | 776 // When emulated, this returns original device scale factor. |
790 float GetOriginalDeviceScaleFactor() const; | 777 float GetOriginalDeviceScaleFactor() const; |
791 | 778 |
792 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 779 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
793 }; | 780 }; |
794 | 781 |
795 } // namespace content | 782 } // namespace content |
796 | 783 |
797 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 784 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |