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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 public IPC::Sender, | 90 public IPC::Sender, |
91 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), | 91 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), |
92 public base::RefCounted<RenderWidget> { | 92 public base::RefCounted<RenderWidget> { |
93 public: | 93 public: |
94 // Creates a new RenderWidget. The opener_id is the routing ID of the | 94 // Creates a new RenderWidget. The opener_id is the routing ID of the |
95 // RenderView that this widget lives inside. | 95 // RenderView that this widget lives inside. |
96 static RenderWidget* Create(int32 opener_id, | 96 static RenderWidget* Create(int32 opener_id, |
97 blink::WebPopupType popup_type, | 97 blink::WebPopupType popup_type, |
98 const blink::WebScreenInfo& screen_info); | 98 const blink::WebScreenInfo& screen_info); |
99 | 99 |
100 // Creates a new RenderWidget that will be attached to a RenderFrame. | |
101 // TODO(kenrb): It has its own routing_id for now but this should | |
Charlie Reis
2014/10/02 00:06:57
This TODO can probably be removed as well?
kenrb
2014/10/02 20:20:48
Done.
| |
102 // eventually change. | |
103 static RenderWidget* CreateForFrame(int routing_id, | |
104 bool hidden, | |
105 const blink::WebScreenInfo& screen_info); | |
106 | |
100 // Creates a WebWidget based on the popup type. | 107 // Creates a WebWidget based on the popup type. |
101 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); | 108 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); |
102 | 109 |
103 int32 routing_id() const { return routing_id_; } | 110 int32 routing_id() const { return routing_id_; } |
104 int32 surface_id() const { return surface_id_; } | 111 int32 surface_id() const { return surface_id_; } |
105 blink::WebWidget* webwidget() const { return webwidget_; } | 112 blink::WebWidget* webwidget() const { return webwidget_; } |
106 gfx::Size size() const { return size_; } | 113 gfx::Size size() const { return size_; } |
107 bool has_focus() const { return has_focus_; } | 114 bool has_focus() const { return has_focus_; } |
108 bool is_fullscreen() const { return is_fullscreen_; } | 115 bool is_fullscreen() const { return is_fullscreen_; } |
109 bool is_hidden() const { return is_hidden_; } | 116 bool is_hidden() const { return is_hidden_; } |
110 bool handling_input_event() const { return handling_input_event_; } | 117 bool handling_input_event() const { return handling_input_event_; } |
111 // Temporary for debugging purposes... | 118 // Temporary for debugging purposes... |
112 bool closing() const { return closing_; } | 119 bool closing() const { return closing_; } |
113 bool is_swapped_out() { return is_swapped_out_; } | 120 bool is_swapped_out() { return is_swapped_out_; } |
114 ui::MenuSourceType context_menu_source_type() { | 121 ui::MenuSourceType context_menu_source_type() { |
115 return context_menu_source_type_; | 122 return context_menu_source_type_; |
116 } | 123 } |
117 bool has_host_context_menu_location() { | 124 bool has_host_context_menu_location() { |
118 return has_host_context_menu_location_; | 125 return has_host_context_menu_location_; |
119 } | 126 } |
120 gfx::Point host_context_menu_location() { | 127 gfx::Point host_context_menu_location() { |
121 return host_context_menu_location_; | 128 return host_context_menu_location_; |
122 } | 129 } |
123 | 130 |
131 // ScreenInfo exposed so it can be passed to subframe RenderWidgets. | |
132 blink::WebScreenInfo screen_info() const { return screen_info_; } | |
133 | |
124 // Functions to track out-of-process frames for special notifications. | 134 // Functions to track out-of-process frames for special notifications. |
125 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); | 135 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); |
126 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); | 136 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); |
127 | 137 |
128 // Functions to track all RenderFrame objects associated with this | 138 // Functions to track all RenderFrame objects associated with this |
129 // RenderWidget. | 139 // RenderWidget. |
130 void RegisterRenderFrame(RenderFrameImpl* frame); | 140 void RegisterRenderFrame(RenderFrameImpl* frame); |
131 void UnregisterRenderFrame(RenderFrameImpl* frame); | 141 void UnregisterRenderFrame(RenderFrameImpl* frame); |
132 | 142 |
133 #if defined(VIDEO_HOLE) | 143 #if defined(VIDEO_HOLE) |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
750 ui::MenuSourceType context_menu_source_type_; | 760 ui::MenuSourceType context_menu_source_type_; |
751 bool has_host_context_menu_location_; | 761 bool has_host_context_menu_location_; |
752 gfx::Point host_context_menu_location_; | 762 gfx::Point host_context_menu_location_; |
753 | 763 |
754 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 764 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
755 }; | 765 }; |
756 | 766 |
757 } // namespace content | 767 } // namespace content |
758 | 768 |
759 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 769 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |