| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 struct ViewMsg_Resize_Params; | 47 struct ViewMsg_Resize_Params; |
| 48 class ViewHostMsg_UpdateRect; | 48 class ViewHostMsg_UpdateRect; |
| 49 | 49 |
| 50 namespace IPC { | 50 namespace IPC { |
| 51 class SyncMessage; | 51 class SyncMessage; |
| 52 class SyncMessageFilter; | 52 class SyncMessageFilter; |
| 53 } | 53 } |
| 54 | 54 |
| 55 namespace blink { | 55 namespace blink { |
| 56 struct WebDeviceEmulationParams; | 56 struct WebDeviceEmulationParams; |
| 57 class WebFrameWidget; | |
| 58 class WebGestureEvent; | 57 class WebGestureEvent; |
| 59 class WebKeyboardEvent; | 58 class WebKeyboardEvent; |
| 60 class WebLocalFrame; | |
| 61 class WebMouseEvent; | 59 class WebMouseEvent; |
| 62 class WebNode; | 60 class WebNode; |
| 63 struct WebPoint; | 61 struct WebPoint; |
| 64 class WebTouchEvent; | 62 class WebTouchEvent; |
| 65 class WebView; | |
| 66 } | 63 } |
| 67 | 64 |
| 68 namespace cc { | 65 namespace cc { |
| 69 struct InputHandlerScrollResult; | 66 struct InputHandlerScrollResult; |
| 70 class OutputSurface; | 67 class OutputSurface; |
| 71 class SwapPromise; | 68 class SwapPromise; |
| 72 } | 69 } |
| 73 | 70 |
| 74 namespace gfx { | 71 namespace gfx { |
| 75 class Range; | 72 class Range; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 96 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), | 93 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), |
| 97 public base::RefCounted<RenderWidget> { | 94 public base::RefCounted<RenderWidget> { |
| 98 public: | 95 public: |
| 99 // Creates a new RenderWidget. The opener_id is the routing ID of the | 96 // Creates a new RenderWidget. The opener_id is the routing ID of the |
| 100 // RenderView that this widget lives inside. | 97 // RenderView that this widget lives inside. |
| 101 static RenderWidget* Create(int32 opener_id, | 98 static RenderWidget* Create(int32 opener_id, |
| 102 CompositorDependencies* compositor_deps, | 99 CompositorDependencies* compositor_deps, |
| 103 blink::WebPopupType popup_type, | 100 blink::WebPopupType popup_type, |
| 104 const blink::WebScreenInfo& screen_info); | 101 const blink::WebScreenInfo& screen_info); |
| 105 | 102 |
| 106 // Creates a new RenderWidget that will be attached to a RenderFrame. | |
| 107 static RenderWidget* CreateForFrame(int routing_id, | |
| 108 int surface_id, | |
| 109 bool hidden, | |
| 110 const blink::WebScreenInfo& screen_info, | |
| 111 CompositorDependencies* compositor_deps, | |
| 112 blink::WebLocalFrame* frame); | |
| 113 | |
| 114 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget, | |
| 115 blink::WebLocalFrame* frame); | |
| 116 | |
| 117 // Creates a WebWidget based on the popup type. | 103 // Creates a WebWidget based on the popup type. |
| 118 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); | 104 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); |
| 119 | 105 |
| 120 int32 routing_id() const { return routing_id_; } | 106 int32 routing_id() const { return routing_id_; } |
| 121 int32 surface_id() const { return surface_id_; } | 107 int32 surface_id() const { return surface_id_; } |
| 122 CompositorDependencies* compositor_deps() const { return compositor_deps_; } | 108 CompositorDependencies* compositor_deps() const { return compositor_deps_; } |
| 123 blink::WebWidget* webwidget() const { return webwidget_; } | 109 blink::WebWidget* webwidget() const { return webwidget_; } |
| 124 gfx::Size size() const { return size_; } | 110 gfx::Size size() const { return size_; } |
| 125 bool has_focus() const { return has_focus_; } | 111 bool has_focus() const { return has_focus_; } |
| 126 bool is_fullscreen() const { return is_fullscreen_; } | 112 bool is_fullscreen() const { return is_fullscreen_; } |
| 127 bool is_hidden() const { return is_hidden_; } | 113 bool is_hidden() const { return is_hidden_; } |
| 128 bool handling_input_event() const { return handling_input_event_; } | 114 bool handling_input_event() const { return handling_input_event_; } |
| 129 // Temporary for debugging purposes... | 115 // Temporary for debugging purposes... |
| 130 bool closing() const { return closing_; } | 116 bool closing() const { return closing_; } |
| 131 bool is_swapped_out() { return is_swapped_out_; } | 117 bool is_swapped_out() { return is_swapped_out_; } |
| 132 ui::MenuSourceType context_menu_source_type() { | 118 ui::MenuSourceType context_menu_source_type() { |
| 133 return context_menu_source_type_; | 119 return context_menu_source_type_; |
| 134 } | 120 } |
| 135 bool has_host_context_menu_location() { | 121 bool has_host_context_menu_location() { |
| 136 return has_host_context_menu_location_; | 122 return has_host_context_menu_location_; |
| 137 } | 123 } |
| 138 gfx::Point host_context_menu_location() { | 124 gfx::Point host_context_menu_location() { |
| 139 return host_context_menu_location_; | 125 return host_context_menu_location_; |
| 140 } | 126 } |
| 141 | 127 |
| 142 // ScreenInfo exposed so it can be passed to subframe RenderWidgets. | |
| 143 blink::WebScreenInfo screen_info() const { return screen_info_; } | |
| 144 | |
| 145 // Functions to track out-of-process frames for special notifications. | 128 // Functions to track out-of-process frames for special notifications. |
| 146 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); | 129 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); |
| 147 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); | 130 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); |
| 148 | 131 |
| 149 // Functions to track all RenderFrame objects associated with this | 132 // Functions to track all RenderFrame objects associated with this |
| 150 // RenderWidget. | 133 // RenderWidget. |
| 151 void RegisterRenderFrame(RenderFrameImpl* frame); | 134 void RegisterRenderFrame(RenderFrameImpl* frame); |
| 152 void UnregisterRenderFrame(RenderFrameImpl* frame); | 135 void UnregisterRenderFrame(RenderFrameImpl* frame); |
| 153 | 136 |
| 154 #if defined(VIDEO_HOLE) | 137 #if defined(VIDEO_HOLE) |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 ui::MenuSourceType context_menu_source_type_; | 789 ui::MenuSourceType context_menu_source_type_; |
| 807 bool has_host_context_menu_location_; | 790 bool has_host_context_menu_location_; |
| 808 gfx::Point host_context_menu_location_; | 791 gfx::Point host_context_menu_location_; |
| 809 | 792 |
| 810 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 793 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 811 }; | 794 }; |
| 812 | 795 |
| 813 } // namespace content | 796 } // namespace content |
| 814 | 797 |
| 815 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 798 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |