| 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; |
| 57 class WebGestureEvent; | 58 class WebGestureEvent; |
| 58 class WebKeyboardEvent; | 59 class WebKeyboardEvent; |
| 60 class WebLocalFrame; |
| 59 class WebMouseEvent; | 61 class WebMouseEvent; |
| 60 class WebTouchEvent; | 62 class WebTouchEvent; |
| 63 class WebView; |
| 61 } | 64 } |
| 62 | 65 |
| 63 namespace cc { | 66 namespace cc { |
| 64 class OutputSurface; | 67 class OutputSurface; |
| 65 class SwapPromise; | 68 class SwapPromise; |
| 66 } | 69 } |
| 67 | 70 |
| 68 namespace gfx { | 71 namespace gfx { |
| 69 class Range; | 72 class Range; |
| 70 } | 73 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 88 public IPC::Sender, | 91 public IPC::Sender, |
| 89 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), | 92 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), |
| 90 public base::RefCounted<RenderWidget> { | 93 public base::RefCounted<RenderWidget> { |
| 91 public: | 94 public: |
| 92 // Creates a new RenderWidget. The opener_id is the routing ID of the | 95 // Creates a new RenderWidget. The opener_id is the routing ID of the |
| 93 // RenderView that this widget lives inside. | 96 // RenderView that this widget lives inside. |
| 94 static RenderWidget* Create(int32 opener_id, | 97 static RenderWidget* Create(int32 opener_id, |
| 95 blink::WebPopupType popup_type, | 98 blink::WebPopupType popup_type, |
| 96 const blink::WebScreenInfo& screen_info); | 99 const blink::WebScreenInfo& screen_info); |
| 97 | 100 |
| 101 // Creates a new RenderWidget that will be attached to a RenderFrame. |
| 102 static RenderWidget* CreateForFrame(int routing_id, |
| 103 int surface_id, |
| 104 bool hidden, |
| 105 const blink::WebScreenInfo& screen_info, |
| 106 blink::WebLocalFrame* frame); |
| 107 |
| 108 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget, |
| 109 blink::WebLocalFrame* frame); |
| 110 |
| 98 // Creates a WebWidget based on the popup type. | 111 // Creates a WebWidget based on the popup type. |
| 99 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); | 112 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); |
| 100 | 113 |
| 101 int32 routing_id() const { return routing_id_; } | 114 int32 routing_id() const { return routing_id_; } |
| 102 int32 surface_id() const { return surface_id_; } | 115 int32 surface_id() const { return surface_id_; } |
| 103 blink::WebWidget* webwidget() const { return webwidget_; } | 116 blink::WebWidget* webwidget() const { return webwidget_; } |
| 104 gfx::Size size() const { return size_; } | 117 gfx::Size size() const { return size_; } |
| 105 bool has_focus() const { return has_focus_; } | 118 bool has_focus() const { return has_focus_; } |
| 106 bool is_fullscreen() const { return is_fullscreen_; } | 119 bool is_fullscreen() const { return is_fullscreen_; } |
| 107 bool is_hidden() const { return is_hidden_; } | 120 bool is_hidden() const { return is_hidden_; } |
| 108 bool handling_input_event() const { return handling_input_event_; } | 121 bool handling_input_event() const { return handling_input_event_; } |
| 109 // Temporary for debugging purposes... | 122 // Temporary for debugging purposes... |
| 110 bool closing() const { return closing_; } | 123 bool closing() const { return closing_; } |
| 111 bool is_swapped_out() { return is_swapped_out_; } | 124 bool is_swapped_out() { return is_swapped_out_; } |
| 112 ui::MenuSourceType context_menu_source_type() { | 125 ui::MenuSourceType context_menu_source_type() { |
| 113 return context_menu_source_type_; | 126 return context_menu_source_type_; |
| 114 } | 127 } |
| 115 bool has_host_context_menu_location() { | 128 bool has_host_context_menu_location() { |
| 116 return has_host_context_menu_location_; | 129 return has_host_context_menu_location_; |
| 117 } | 130 } |
| 118 gfx::Point host_context_menu_location() { | 131 gfx::Point host_context_menu_location() { |
| 119 return host_context_menu_location_; | 132 return host_context_menu_location_; |
| 120 } | 133 } |
| 121 | 134 |
| 135 // ScreenInfo exposed so it can be passed to subframe RenderWidgets. |
| 136 blink::WebScreenInfo screen_info() const { return screen_info_; } |
| 137 |
| 122 // Functions to track out-of-process frames for special notifications. | 138 // Functions to track out-of-process frames for special notifications. |
| 123 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); | 139 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); |
| 124 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); | 140 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); |
| 125 | 141 |
| 126 // Functions to track all RenderFrame objects associated with this | 142 // Functions to track all RenderFrame objects associated with this |
| 127 // RenderWidget. | 143 // RenderWidget. |
| 128 void RegisterRenderFrame(RenderFrameImpl* frame); | 144 void RegisterRenderFrame(RenderFrameImpl* frame); |
| 129 void UnregisterRenderFrame(RenderFrameImpl* frame); | 145 void UnregisterRenderFrame(RenderFrameImpl* frame); |
| 130 | 146 |
| 131 #if defined(VIDEO_HOLE) | 147 #if defined(VIDEO_HOLE) |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 ui::MenuSourceType context_menu_source_type_; | 780 ui::MenuSourceType context_menu_source_type_; |
| 765 bool has_host_context_menu_location_; | 781 bool has_host_context_menu_location_; |
| 766 gfx::Point host_context_menu_location_; | 782 gfx::Point host_context_menu_location_; |
| 767 | 783 |
| 768 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 784 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 769 }; | 785 }; |
| 770 | 786 |
| 771 } // namespace content | 787 } // namespace content |
| 772 | 788 |
| 773 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 789 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |