| 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 <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 struct WebRenderingStatsImpl; | 58 struct WebRenderingStatsImpl; |
| 59 } | 59 } |
| 60 | 60 |
| 61 namespace cc { class OutputSurface; } | 61 namespace cc { class OutputSurface; } |
| 62 | 62 |
| 63 namespace ui { | 63 namespace ui { |
| 64 class Range; | 64 class Range; |
| 65 } | 65 } |
| 66 | 66 |
| 67 namespace webkit { | 67 namespace webkit { |
| 68 namespace npapi { | |
| 69 struct WebPluginGeometry; | |
| 70 } // namespace npapi | |
| 71 | |
| 72 namespace ppapi { | 68 namespace ppapi { |
| 73 class PluginInstance; | 69 class PluginInstance; |
| 74 } // namespace ppapi | 70 } // namespace ppapi |
| 75 } // namespace webkit | 71 } // namespace webkit |
| 76 | 72 |
| 77 namespace content { | 73 namespace content { |
| 78 struct GpuRenderingStats; | |
| 79 class RenderWidgetCompositor; | 74 class RenderWidgetCompositor; |
| 80 class RenderWidgetTest; | 75 class RenderWidgetTest; |
| 76 struct GpuRenderingStats; |
| 77 struct WebPluginGeometry; |
| 81 | 78 |
| 82 // RenderWidget provides a communication bridge between a WebWidget and | 79 // RenderWidget provides a communication bridge between a WebWidget and |
| 83 // a RenderWidgetHost, the latter of which lives in a different process. | 80 // a RenderWidgetHost, the latter of which lives in a different process. |
| 84 class CONTENT_EXPORT RenderWidget | 81 class CONTENT_EXPORT RenderWidget |
| 85 : public IPC::Listener, | 82 : public IPC::Listener, |
| 86 public IPC::Sender, | 83 public IPC::Sender, |
| 87 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), | 84 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), |
| 88 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), | 85 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), |
| 89 public base::RefCounted<RenderWidget> { | 86 public base::RefCounted<RenderWidget> { |
| 90 public: | 87 public: |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 virtual WebKit::WebRect windowResizerRect(); | 152 virtual WebKit::WebRect windowResizerRect(); |
| 156 virtual WebKit::WebRect rootWindowRect(); | 153 virtual WebKit::WebRect rootWindowRect(); |
| 157 virtual WebKit::WebScreenInfo screenInfo(); | 154 virtual WebKit::WebScreenInfo screenInfo(); |
| 158 virtual float deviceScaleFactor(); | 155 virtual float deviceScaleFactor(); |
| 159 virtual void resetInputMethod(); | 156 virtual void resetInputMethod(); |
| 160 virtual void didHandleGestureEvent(const WebKit::WebGestureEvent& event, | 157 virtual void didHandleGestureEvent(const WebKit::WebGestureEvent& event, |
| 161 bool event_cancelled); | 158 bool event_cancelled); |
| 162 | 159 |
| 163 // Called when a plugin is moved. These events are queued up and sent with | 160 // Called when a plugin is moved. These events are queued up and sent with |
| 164 // the next paint or scroll message to the host. | 161 // the next paint or scroll message to the host. |
| 165 void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move); | 162 void SchedulePluginMove(const WebPluginGeometry& move); |
| 166 | 163 |
| 167 // Called when a plugin window has been destroyed, to make sure the currently | 164 // Called when a plugin window has been destroyed, to make sure the currently |
| 168 // pending moves don't try to reference it. | 165 // pending moves don't try to reference it. |
| 169 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); | 166 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window); |
| 170 | 167 |
| 171 // Fills in a WebRenderingStatsImpl struct containing information about | 168 // Fills in a WebRenderingStatsImpl struct containing information about |
| 172 // rendering, e.g. count of frames rendered, time spent painting. | 169 // rendering, e.g. count of frames rendered, time spent painting. |
| 173 void GetRenderingStats(WebKit::WebRenderingStatsImpl&) const; | 170 void GetRenderingStats(WebKit::WebRenderingStatsImpl&) const; |
| 174 | 171 |
| 175 // Fills in a GpuRenderingStats struct containing information about | 172 // Fills in a GpuRenderingStats struct containing information about |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 // Stores the current composition character bounds. | 647 // Stores the current composition character bounds. |
| 651 std::vector<gfx::Rect> composition_character_bounds_; | 648 std::vector<gfx::Rect> composition_character_bounds_; |
| 652 | 649 |
| 653 // Stores the current composition range. | 650 // Stores the current composition range. |
| 654 ui::Range composition_range_; | 651 ui::Range composition_range_; |
| 655 | 652 |
| 656 // The kind of popup this widget represents, NONE if not a popup. | 653 // The kind of popup this widget represents, NONE if not a popup. |
| 657 WebKit::WebPopupType popup_type_; | 654 WebKit::WebPopupType popup_type_; |
| 658 | 655 |
| 659 // Holds all the needed plugin window moves for a scroll. | 656 // Holds all the needed plugin window moves for a scroll. |
| 660 typedef std::vector<webkit::npapi::WebPluginGeometry> WebPluginGeometryVector; | 657 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector; |
| 661 WebPluginGeometryVector plugin_window_moves_; | 658 WebPluginGeometryVector plugin_window_moves_; |
| 662 | 659 |
| 663 // A custom background for the widget. | 660 // A custom background for the widget. |
| 664 SkBitmap background_; | 661 SkBitmap background_; |
| 665 | 662 |
| 666 // While we are waiting for the browser to update window sizes, we track the | 663 // While we are waiting for the browser to update window sizes, we track the |
| 667 // pending size temporarily. | 664 // pending size temporarily. |
| 668 int pending_window_rect_count_; | 665 int pending_window_rect_count_; |
| 669 WebKit::WebRect pending_window_rect_; | 666 WebKit::WebRect pending_window_rect_; |
| 670 | 667 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 ui::LatencyInfo latency_info_; | 721 ui::LatencyInfo latency_info_; |
| 725 | 722 |
| 726 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 723 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 727 | 724 |
| 728 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 725 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 729 }; | 726 }; |
| 730 | 727 |
| 731 } // namespace content | 728 } // namespace content |
| 732 | 729 |
| 733 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 730 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |