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