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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 void SetRoutingID(int32_t routing_id); | 157 void SetRoutingID(int32_t routing_id); |
158 | 158 |
159 CompositorDependencies* compositor_deps() const { return compositor_deps_; } | 159 CompositorDependencies* compositor_deps() const { return compositor_deps_; } |
160 virtual blink::WebWidget* GetWebWidget() const; | 160 virtual blink::WebWidget* GetWebWidget() const; |
161 const gfx::Size& size() const { return size_; } | 161 const gfx::Size& size() const { return size_; } |
162 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } | 162 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } |
163 blink::WebDisplayMode display_mode() const { return display_mode_; } | 163 blink::WebDisplayMode display_mode() const { return display_mode_; } |
164 bool is_hidden() const { return is_hidden_; } | 164 bool is_hidden() const { return is_hidden_; } |
165 // Temporary for debugging purposes... | 165 // Temporary for debugging purposes... |
166 bool closing() const { return closing_; } | 166 bool closing() const { return closing_; } |
167 bool is_swapped_out() { return is_swapped_out_; } | |
168 bool has_host_context_menu_location() { | 167 bool has_host_context_menu_location() { |
169 return has_host_context_menu_location_; | 168 return has_host_context_menu_location_; |
170 } | 169 } |
171 gfx::Point host_context_menu_location() { | 170 gfx::Point host_context_menu_location() { |
172 return host_context_menu_location_; | 171 return host_context_menu_location_; |
173 } | 172 } |
174 | 173 |
175 void set_owner_delegate(RenderWidgetOwnerDelegate* owner_delegate) { | 174 void set_owner_delegate(RenderWidgetOwnerDelegate* owner_delegate) { |
176 DCHECK(!owner_delegate_); | 175 DCHECK(!owner_delegate_); |
177 owner_delegate_ = owner_delegate; | 176 owner_delegate_ = owner_delegate; |
178 } | 177 } |
179 | 178 |
180 RenderWidgetOwnerDelegate* owner_delegate() { return owner_delegate_; } | 179 RenderWidgetOwnerDelegate* owner_delegate() { return owner_delegate_; } |
181 | 180 |
182 // ScreenInfo exposed so it can be passed to subframe RenderWidgets. | 181 // ScreenInfo exposed so it can be passed to subframe RenderWidgets. |
183 ScreenInfo screen_info() const { return screen_info_; } | 182 ScreenInfo screen_info() const { return screen_info_; } |
184 | 183 |
184 // Sets whether this RenderWidget has been swapped out to be displayed by | |
185 // a RenderWidget in a different process. If so, no new IPC messages will be | |
186 // sent (only ACKs) and the process is free to exit when there are no other | |
187 // active RenderWidgets. | |
188 void SetSwappedOut(bool is_swapped_out); | |
nasko
2016/10/13 21:26:28
You should reorder the .cc file to match the heade
alexmos
2016/10/14 17:07:38
Done. (Though it's not perfect, as many other nea
| |
189 | |
190 bool is_swapped_out() { return is_swapped_out_; } | |
nasko
2016/10/13 21:26:28
rant: Ah! I can't wait to kill this boolean. It do
alexmos
2016/10/14 17:07:38
Acknowledged.
| |
191 | |
185 // Manage edit commands to be used for the next keyboard event. | 192 // Manage edit commands to be used for the next keyboard event. |
186 const EditCommands& edit_commands() const { return edit_commands_; } | 193 const EditCommands& edit_commands() const { return edit_commands_; } |
187 void SetEditCommandForNextKeyEvent(const std::string& name, | 194 void SetEditCommandForNextKeyEvent(const std::string& name, |
188 const std::string& value); | 195 const std::string& value); |
189 void ClearEditCommands(); | 196 void ClearEditCommands(); |
190 | 197 |
191 // Functions to track out-of-process frames for special notifications. | 198 // Functions to track out-of-process frames for special notifications. |
192 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); | 199 void RegisterRenderFrameProxy(RenderFrameProxy* proxy); |
193 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); | 200 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy); |
194 | 201 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
432 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); | 439 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); |
433 | 440 |
434 // Initializes this view with the given opener. | 441 // Initializes this view with the given opener. |
435 bool Init(int32_t opener_id); | 442 bool Init(int32_t opener_id); |
436 | 443 |
437 // Called by Init and subclasses to perform initialization. | 444 // Called by Init and subclasses to perform initialization. |
438 bool DoInit(int32_t opener_id, | 445 bool DoInit(int32_t opener_id, |
439 blink::WebWidget* web_widget, | 446 blink::WebWidget* web_widget, |
440 IPC::SyncMessage* create_widget_message); | 447 IPC::SyncMessage* create_widget_message); |
441 | 448 |
442 // Sets whether this RenderWidget has been swapped out to be displayed by | |
443 // a RenderWidget in a different process. If so, no new IPC messages will be | |
444 // sent (only ACKs) and the process is free to exit when there are no other | |
445 // active RenderWidgets. | |
446 void SetSwappedOut(bool is_swapped_out); | |
447 | |
448 // Allows the process to exit once the unload handler has finished, if there | 449 // Allows the process to exit once the unload handler has finished, if there |
449 // are no other active RenderWidgets. | 450 // are no other active RenderWidgets. |
450 void WasSwappedOut(); | 451 void WasSwappedOut(); |
451 | 452 |
452 void DoDeferredClose(); | 453 void DoDeferredClose(); |
453 void NotifyOnClose(); | 454 void NotifyOnClose(); |
454 | 455 |
455 gfx::Size GetSizeForWebWidget() const; | 456 gfx::Size GetSizeForWebWidget() const; |
456 virtual void ResizeWebWidget(); | 457 virtual void ResizeWebWidget(); |
457 | 458 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
830 // Stores edit commands associated to the next key event. | 831 // Stores edit commands associated to the next key event. |
831 // Will be cleared as soon as the next key event is processed. | 832 // Will be cleared as soon as the next key event is processed. |
832 EditCommands edit_commands_; | 833 EditCommands edit_commands_; |
833 | 834 |
834 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 835 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
835 }; | 836 }; |
836 | 837 |
837 } // namespace content | 838 } // namespace content |
838 | 839 |
839 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 840 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |