| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } // namespace npapi | 67 } // namespace npapi |
| 68 | 68 |
| 69 namespace ppapi { | 69 namespace ppapi { |
| 70 class PluginInstance; | 70 class PluginInstance; |
| 71 } // namespace ppapi | 71 } // namespace ppapi |
| 72 } // namespace webkit | 72 } // namespace webkit |
| 73 | 73 |
| 74 // RenderWidget provides a communication bridge between a WebWidget and | 74 // RenderWidget provides a communication bridge between a WebWidget and |
| 75 // a RenderWidgetHost, the latter of which lives in a different process. | 75 // a RenderWidgetHost, the latter of which lives in a different process. |
| 76 class CONTENT_EXPORT RenderWidget | 76 class CONTENT_EXPORT RenderWidget |
| 77 : public IPC::Channel::Listener, | 77 : public IPC::Listener, |
| 78 public IPC::Message::Sender, | 78 public IPC::Sender, |
| 79 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), | 79 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), |
| 80 public base::RefCounted<RenderWidget> { | 80 public base::RefCounted<RenderWidget> { |
| 81 public: | 81 public: |
| 82 // Creates a new RenderWidget. The opener_id is the routing ID of the | 82 // Creates a new RenderWidget. The opener_id is the routing ID of the |
| 83 // RenderView that this widget lives inside. | 83 // RenderView that this widget lives inside. |
| 84 static RenderWidget* Create(int32 opener_id, | 84 static RenderWidget* Create(int32 opener_id, |
| 85 WebKit::WebPopupType popup_type, | 85 WebKit::WebPopupType popup_type, |
| 86 const WebKit::WebScreenInfo& screen_info); | 86 const WebKit::WebScreenInfo& screen_info); |
| 87 | 87 |
| 88 // Creates a WebWidget based on the popup type. | 88 // Creates a WebWidget based on the popup type. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 104 | 104 |
| 105 // May return NULL when the window is closing. | 105 // May return NULL when the window is closing. |
| 106 WebKit::WebWidget* webwidget() const { return webwidget_; } | 106 WebKit::WebWidget* webwidget() const { return webwidget_; } |
| 107 | 107 |
| 108 gfx::NativeViewId host_window() const { return host_window_; } | 108 gfx::NativeViewId host_window() const { return host_window_; } |
| 109 gfx::Size size() const { return size_; } | 109 gfx::Size size() const { return size_; } |
| 110 bool has_focus() const { return has_focus_; } | 110 bool has_focus() const { return has_focus_; } |
| 111 bool is_fullscreen() const { return is_fullscreen_; } | 111 bool is_fullscreen() const { return is_fullscreen_; } |
| 112 bool is_hidden() const { return is_hidden_; } | 112 bool is_hidden() const { return is_hidden_; } |
| 113 | 113 |
| 114 // IPC::Channel::Listener | 114 // IPC::Listener |
| 115 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 115 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 116 | 116 |
| 117 // IPC::Message::Sender | 117 // IPC::Sender |
| 118 virtual bool Send(IPC::Message* msg) OVERRIDE; | 118 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 119 | 119 |
| 120 // WebKit::WebWidgetClient | 120 // WebKit::WebWidgetClient |
| 121 virtual void willBeginCompositorFrame(); | 121 virtual void willBeginCompositorFrame(); |
| 122 virtual void didInvalidateRect(const WebKit::WebRect&); | 122 virtual void didInvalidateRect(const WebKit::WebRect&); |
| 123 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect); | 123 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect); |
| 124 virtual void didAutoResize(const WebKit::WebSize& new_size); | 124 virtual void didAutoResize(const WebKit::WebSize& new_size); |
| 125 virtual void didActivateCompositor(int input_handler_identifier); | 125 virtual void didActivateCompositor(int input_handler_identifier); |
| 126 virtual void didDeactivateCompositor(); | 126 virtual void didDeactivateCompositor(); |
| 127 virtual void didBecomeReadyForAdditionalInput(); | 127 virtual void didBecomeReadyForAdditionalInput(); |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 WebKit::WebScreenInfo screen_info_; | 555 WebKit::WebScreenInfo screen_info_; |
| 556 | 556 |
| 557 // The device scale factor. This value is computed from the DPI entries in | 557 // The device scale factor. This value is computed from the DPI entries in |
| 558 // |screen_info_| on some platforms, and defaults to 1 on other platforms. | 558 // |screen_info_| on some platforms, and defaults to 1 on other platforms. |
| 559 int device_scale_factor_; | 559 int device_scale_factor_; |
| 560 | 560 |
| 561 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 561 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 562 }; | 562 }; |
| 563 | 563 |
| 564 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 564 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |