| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_RENDERER_RENDER_WIDGET_H__ | 5 #ifndef CHROME_RENDERER_RENDER_WIDGET_H__ |
| 6 #define CHROME_RENDERER_RENDER_WIDGET_H__ | 6 #define CHROME_RENDERER_RENDER_WIDGET_H__ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/gfx/point.h" | 10 #include "base/gfx/point.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class RenderWidget : public IPC::Channel::Listener, | 25 class RenderWidget : public IPC::Channel::Listener, |
| 26 public IPC::Message::Sender, | 26 public IPC::Message::Sender, |
| 27 virtual public WebWidgetDelegate, | 27 virtual public WebWidgetDelegate, |
| 28 public base::RefCounted<RenderWidget> { | 28 public base::RefCounted<RenderWidget> { |
| 29 public: | 29 public: |
| 30 // Creates a new RenderWidget. The opener_id is the routing ID of the | 30 // Creates a new RenderWidget. The opener_id is the routing ID of the |
| 31 // RenderView that this widget lives inside. The render_thread is any | 31 // RenderView that this widget lives inside. The render_thread is any |
| 32 // RenderThreadBase implementation, mostly commonly g_render_thread. | 32 // RenderThreadBase implementation, mostly commonly g_render_thread. |
| 33 static RenderWidget* Create(int32 opener_id, | 33 static RenderWidget* Create(int32 opener_id, |
| 34 RenderThreadBase* render_thread, | 34 RenderThreadBase* render_thread, |
| 35 bool focus_on_show); | 35 bool activatable); |
| 36 | 36 |
| 37 // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if | 37 // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if |
| 38 // not yet assigned a view ID, in which case, the process MUST NOT send | 38 // not yet assigned a view ID, in which case, the process MUST NOT send |
| 39 // messages with this ID to the parent. | 39 // messages with this ID to the parent. |
| 40 int32 routing_id() const { | 40 int32 routing_id() const { |
| 41 return routing_id_; | 41 return routing_id_; |
| 42 } | 42 } |
| 43 | 43 |
| 44 // May return NULL when the window is closing. | 44 // May return NULL when the window is closing. |
| 45 WebWidget* webwidget() const { | 45 WebWidget* webwidget() const { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 virtual bool IsHidden() { return is_hidden_; } | 82 virtual bool IsHidden() { return is_hidden_; } |
| 83 | 83 |
| 84 // Close the underlying WebWidget. | 84 // Close the underlying WebWidget. |
| 85 void Close(); | 85 void Close(); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 // Friend RefCounted so that the dtor can be non-public. Using this class | 88 // Friend RefCounted so that the dtor can be non-public. Using this class |
| 89 // without ref-counting is an error. | 89 // without ref-counting is an error. |
| 90 friend class base::RefCounted<RenderWidget>; | 90 friend class base::RefCounted<RenderWidget>; |
| 91 | 91 |
| 92 RenderWidget(RenderThreadBase* render_thread, bool focus_on_show); | 92 RenderWidget(RenderThreadBase* render_thread, bool activatable); |
| 93 virtual ~RenderWidget(); | 93 virtual ~RenderWidget(); |
| 94 | 94 |
| 95 // Initializes this view with the given opener. CompleteInit must be called | 95 // Initializes this view with the given opener. CompleteInit must be called |
| 96 // later. | 96 // later. |
| 97 void Init(int32 opener_id); | 97 void Init(int32 opener_id); |
| 98 | 98 |
| 99 // Finishes creation of a pending view started with Init. | 99 // Finishes creation of a pending view started with Init. |
| 100 void CompleteInit(HWND parent); | 100 void CompleteInit(HWND parent); |
| 101 | 101 |
| 102 // Paints the given rectangular region of the WebWidget into paint_buf (a | 102 // Paints the given rectangular region of the WebWidget into paint_buf (a |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // If the above values is updated, a renderer process sends an IPC message | 258 // If the above values is updated, a renderer process sends an IPC message |
| 259 // to a browser process. A browser process uses these values to | 259 // to a browser process. A browser process uses these values to |
| 260 // activate/deactivate IME and set the position of IME windows. | 260 // activate/deactivate IME and set the position of IME windows. |
| 261 bool ime_control_enable_ime_; | 261 bool ime_control_enable_ime_; |
| 262 int ime_control_x_; | 262 int ime_control_x_; |
| 263 int ime_control_y_; | 263 int ime_control_y_; |
| 264 bool ime_control_new_state_; | 264 bool ime_control_new_state_; |
| 265 bool ime_control_updated_; | 265 bool ime_control_updated_; |
| 266 bool ime_control_busy_; | 266 bool ime_control_busy_; |
| 267 | 267 |
| 268 // Whether the window for this RenderWidget should be focused when shown. | 268 // Whether the window for this RenderWidget can be activated. |
| 269 bool focus_on_show_; | 269 bool activatable_; |
| 270 | 270 |
| 271 // Holds all the needed plugin window moves for a scroll. | 271 // Holds all the needed plugin window moves for a scroll. |
| 272 std::vector<WebPluginGeometry> plugin_window_moves_; | 272 std::vector<WebPluginGeometry> plugin_window_moves_; |
| 273 | 273 |
| 274 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); | 274 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); |
| 275 }; | 275 }; |
| 276 | 276 |
| 277 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ | 277 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ |
| OLD | NEW |