| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 // Closes a RenderWidget that was created by |CreateForFrame|. | 149 // Closes a RenderWidget that was created by |CreateForFrame|. |
| 150 // TODO(avi): De-virtualize this once RenderViewImpl has-a RenderWidget. | 150 // TODO(avi): De-virtualize this once RenderViewImpl has-a RenderWidget. |
| 151 // https://crbug.com/545684 | 151 // https://crbug.com/545684 |
| 152 virtual void CloseForFrame(); | 152 virtual void CloseForFrame(); |
| 153 | 153 |
| 154 int32_t routing_id() const { return routing_id_; } | 154 int32_t routing_id() const { return routing_id_; } |
| 155 void SetRoutingID(int32_t routing_id); | 155 void SetRoutingID(int32_t routing_id); |
| 156 | 156 |
| 157 CompositorDependencies* compositor_deps() const { return compositor_deps_; } | 157 CompositorDependencies* compositor_deps() const { return compositor_deps_; } |
| 158 blink::WebWidget* webwidget() const { return webwidget_; } | 158 virtual blink::WebWidget* GetWebWidget() const; |
| 159 const gfx::Size& size() const { return size_; } | 159 const gfx::Size& size() const { return size_; } |
| 160 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } | 160 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } |
| 161 blink::WebDisplayMode display_mode() const { return display_mode_; } | 161 blink::WebDisplayMode display_mode() const { return display_mode_; } |
| 162 bool is_hidden() const { return is_hidden_; } | 162 bool is_hidden() const { return is_hidden_; } |
| 163 // Temporary for debugging purposes... | 163 // Temporary for debugging purposes... |
| 164 bool closing() const { return closing_; } | 164 bool closing() const { return closing_; } |
| 165 bool is_swapped_out() { return is_swapped_out_; } | 165 bool is_swapped_out() { return is_swapped_out_; } |
| 166 bool has_host_context_menu_location() { | 166 bool has_host_context_menu_location() { |
| 167 return has_host_context_menu_location_; | 167 return has_host_context_menu_location_; |
| 168 } | 168 } |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 void OnWaitNextFrameForTests(int routing_id); | 613 void OnWaitNextFrameForTests(int routing_id); |
| 614 | 614 |
| 615 // Routing ID that allows us to communicate to the parent browser process | 615 // Routing ID that allows us to communicate to the parent browser process |
| 616 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 616 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 617 int32_t routing_id_; | 617 int32_t routing_id_; |
| 618 | 618 |
| 619 // Dependencies for initializing a compositor, including flags for optional | 619 // Dependencies for initializing a compositor, including flags for optional |
| 620 // features. | 620 // features. |
| 621 CompositorDependencies* const compositor_deps_; | 621 CompositorDependencies* const compositor_deps_; |
| 622 | 622 |
| 623 // Use GetWebWidget() instead of using webwidget_internal_ directly. |
| 623 // We are responsible for destroying this object via its Close method. | 624 // We are responsible for destroying this object via its Close method. |
| 624 // May be NULL when the window is closing. | 625 // May be NULL when the window is closing. |
| 625 blink::WebWidget* webwidget_; | 626 blink::WebWidget* webwidget_internal_; |
| 626 | 627 |
| 627 // The delegate of the owner of this object. | 628 // The delegate of the owner of this object. |
| 628 RenderWidgetOwnerDelegate* owner_delegate_; | 629 RenderWidgetOwnerDelegate* owner_delegate_; |
| 629 | 630 |
| 630 // This is lazily constructed and must not outlive webwidget_. | 631 // This is lazily constructed and must not outlive webwidget_. |
| 631 std::unique_ptr<RenderWidgetCompositor> compositor_; | 632 std::unique_ptr<RenderWidgetCompositor> compositor_; |
| 632 | 633 |
| 633 // Set to the ID of the view that initiated creating this view, if any. When | 634 // Set to the ID of the view that initiated creating this view, if any. When |
| 634 // the view was initiated by the browser (the common case), this will be | 635 // the view was initiated by the browser (the common case), this will be |
| 635 // MSG_ROUTING_NONE. This is used in determining ownership when opening | 636 // MSG_ROUTING_NONE. This is used in determining ownership when opening |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 // Stores edit commands associated to the next key event. | 820 // Stores edit commands associated to the next key event. |
| 820 // Will be cleared as soon as the next key event is processed. | 821 // Will be cleared as soon as the next key event is processed. |
| 821 EditCommands edit_commands_; | 822 EditCommands edit_commands_; |
| 822 | 823 |
| 823 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 824 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 824 }; | 825 }; |
| 825 | 826 |
| 826 } // namespace content | 827 } // namespace content |
| 827 | 828 |
| 828 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 829 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |