| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 public: | 105 public: |
| 106 // Creates a new RenderWidget. The opener_id is the routing ID of the | 106 // Creates a new RenderWidget. The opener_id is the routing ID of the |
| 107 // RenderView that this widget lives inside. | 107 // RenderView that this widget lives inside. |
| 108 static RenderWidget* Create(int32 opener_id, | 108 static RenderWidget* Create(int32 opener_id, |
| 109 CompositorDependencies* compositor_deps, | 109 CompositorDependencies* compositor_deps, |
| 110 blink::WebPopupType popup_type, | 110 blink::WebPopupType popup_type, |
| 111 const blink::WebScreenInfo& screen_info); | 111 const blink::WebScreenInfo& screen_info); |
| 112 | 112 |
| 113 // Creates a new RenderWidget that will be attached to a RenderFrame. | 113 // Creates a new RenderWidget that will be attached to a RenderFrame. |
| 114 static RenderWidget* CreateForFrame(int routing_id, | 114 static RenderWidget* CreateForFrame(int routing_id, |
| 115 int surface_id, | |
| 116 bool hidden, | 115 bool hidden, |
| 117 const blink::WebScreenInfo& screen_info, | 116 const blink::WebScreenInfo& screen_info, |
| 118 CompositorDependencies* compositor_deps, | 117 CompositorDependencies* compositor_deps, |
| 119 blink::WebLocalFrame* frame); | 118 blink::WebLocalFrame* frame); |
| 120 | 119 |
| 121 // Closes a RenderWidget that was created by |CreateForFrame|. | 120 // Closes a RenderWidget that was created by |CreateForFrame|. |
| 122 void CloseForFrame(); | 121 void CloseForFrame(); |
| 123 | 122 |
| 124 int32 routing_id() const { return routing_id_; } | 123 int32 routing_id() const { return routing_id_; } |
| 125 int32 surface_id() const { return surface_id_; } | |
| 126 CompositorDependencies* compositor_deps() const { return compositor_deps_; } | 124 CompositorDependencies* compositor_deps() const { return compositor_deps_; } |
| 127 blink::WebWidget* webwidget() const { return webwidget_; } | 125 blink::WebWidget* webwidget() const { return webwidget_; } |
| 128 gfx::Size size() const { return size_; } | 126 gfx::Size size() const { return size_; } |
| 129 bool has_focus() const { return has_focus_; } | 127 bool has_focus() const { return has_focus_; } |
| 130 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } | 128 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } |
| 131 blink::WebDisplayMode display_mode() const { return display_mode_; } | 129 blink::WebDisplayMode display_mode() const { return display_mode_; } |
| 132 bool is_hidden() const { return is_hidden_; } | 130 bool is_hidden() const { return is_hidden_; } |
| 133 bool handling_input_event() const { return handling_input_event_; } | 131 bool handling_input_event() const { return handling_input_event_; } |
| 134 // Temporary for debugging purposes... | 132 // Temporary for debugging purposes... |
| 135 bool closing() const { return closing_; } | 133 bool closing() const { return closing_; } |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 virtual void didUpdateTextOfFocusedElementByNonUserInput(); | 582 virtual void didUpdateTextOfFocusedElementByNonUserInput(); |
| 585 | 583 |
| 586 // Creates a 3D context associated with this view. | 584 // Creates a 3D context associated with this view. |
| 587 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( | 585 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( |
| 588 bool compositor); | 586 bool compositor); |
| 589 | 587 |
| 590 // Routing ID that allows us to communicate to the parent browser process | 588 // Routing ID that allows us to communicate to the parent browser process |
| 591 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 589 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 592 int32 routing_id_; | 590 int32 routing_id_; |
| 593 | 591 |
| 594 int32 surface_id_; | |
| 595 | |
| 596 // Dependencies for initializing a compositor, including flags for optional | 592 // Dependencies for initializing a compositor, including flags for optional |
| 597 // features. | 593 // features. |
| 598 CompositorDependencies* const compositor_deps_; | 594 CompositorDependencies* const compositor_deps_; |
| 599 | 595 |
| 600 // We are responsible for destroying this object via its Close method. | 596 // We are responsible for destroying this object via its Close method. |
| 601 // May be NULL when the window is closing. | 597 // May be NULL when the window is closing. |
| 602 blink::WebWidget* webwidget_; | 598 blink::WebWidget* webwidget_; |
| 603 | 599 |
| 604 // This is lazily constructed and must not outlive webwidget_. | 600 // This is lazily constructed and must not outlive webwidget_. |
| 605 scoped_ptr<RenderWidgetCompositor> compositor_; | 601 scoped_ptr<RenderWidgetCompositor> compositor_; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 ui::MenuSourceType context_menu_source_type_; | 807 ui::MenuSourceType context_menu_source_type_; |
| 812 bool has_host_context_menu_location_; | 808 bool has_host_context_menu_location_; |
| 813 gfx::Point host_context_menu_location_; | 809 gfx::Point host_context_menu_location_; |
| 814 | 810 |
| 815 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 811 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 816 }; | 812 }; |
| 817 | 813 |
| 818 } // namespace content | 814 } // namespace content |
| 819 | 815 |
| 820 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 816 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |