| 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/native_widget_types.h" | 10 #include "base/gfx/native_widget_types.h" |
| 11 #include "base/gfx/point.h" | 11 #include "base/gfx/point.h" |
| 12 #include "base/gfx/rect.h" | 12 #include "base/gfx/rect.h" |
| 13 #include "base/gfx/size.h" | 13 #include "base/gfx/size.h" |
| 14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 15 #include "base/shared_memory.h" | 15 #include "base/shared_memory.h" |
| 16 #include "chrome/common/ipc_channel.h" | 16 #include "chrome/common/ipc_channel.h" |
| 17 #include "chrome/renderer/render_process.h" | 17 #include "chrome/renderer/render_process.h" |
| 18 #include "skia/ext/platform_canvas.h" | 18 #include "skia/ext/platform_canvas.h" |
| 19 | 19 |
| 20 #include "webkit/glue/webwidget_delegate.h" | 20 #include "webkit/glue/webwidget_delegate.h" |
| 21 #include "webkit/glue/webcursor.h" | 21 #include "webkit/glue/webcursor.h" |
| 22 #include "webkit/glue/webtextdirection.h" |
| 22 | 23 |
| 23 class RenderThreadBase; | 24 class RenderThreadBase; |
| 24 struct WebPluginGeometry; | 25 struct WebPluginGeometry; |
| 25 | 26 |
| 26 // RenderWidget provides a communication bridge between a WebWidget and | 27 // RenderWidget provides a communication bridge between a WebWidget and |
| 27 // a RenderWidgetHost, the latter of which lives in a different process. | 28 // a RenderWidgetHost, the latter of which lives in a different process. |
| 28 class RenderWidget : public IPC::Channel::Listener, | 29 class RenderWidget : public IPC::Channel::Listener, |
| 29 public IPC::Message::Sender, | 30 public IPC::Message::Sender, |
| 30 virtual public WebWidgetDelegate, | 31 virtual public WebWidgetDelegate, |
| 31 public base::RefCounted<RenderWidget> { | 32 public base::RefCounted<RenderWidget> { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void OnPaintRectAck(); | 122 void OnPaintRectAck(); |
| 122 void OnScrollRectAck(); | 123 void OnScrollRectAck(); |
| 123 void OnHandleInputEvent(const IPC::Message& message); | 124 void OnHandleInputEvent(const IPC::Message& message); |
| 124 void OnMouseCaptureLost(); | 125 void OnMouseCaptureLost(); |
| 125 void OnSetFocus(bool enable); | 126 void OnSetFocus(bool enable); |
| 126 void OnImeSetInputMode(bool is_active); | 127 void OnImeSetInputMode(bool is_active); |
| 127 void OnImeSetComposition(int string_type, int cursor_position, | 128 void OnImeSetComposition(int string_type, int cursor_position, |
| 128 int target_start, int target_end, | 129 int target_start, int target_end, |
| 129 const std::wstring& ime_string); | 130 const std::wstring& ime_string); |
| 130 void OnMsgRepaint(const gfx::Size& size_to_paint); | 131 void OnMsgRepaint(const gfx::Size& size_to_paint); |
| 132 void OnSetTextDirection(WebTextDirection direction); |
| 131 | 133 |
| 132 // True if a PaintRect_ACK message is pending. | 134 // True if a PaintRect_ACK message is pending. |
| 133 bool paint_reply_pending() const { | 135 bool paint_reply_pending() const { |
| 134 return paint_reply_pending_; | 136 return paint_reply_pending_; |
| 135 } | 137 } |
| 136 | 138 |
| 137 // True if a ScrollRect_ACK message is pending. | 139 // True if a ScrollRect_ACK message is pending. |
| 138 bool scroll_reply_pending() const { | 140 bool scroll_reply_pending() const { |
| 139 return current_scroll_buf_ != NULL; | 141 return current_scroll_buf_ != NULL; |
| 140 } | 142 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // Whether the window for this RenderWidget can be activated. | 257 // Whether the window for this RenderWidget can be activated. |
| 256 bool activatable_; | 258 bool activatable_; |
| 257 | 259 |
| 258 // Holds all the needed plugin window moves for a scroll. | 260 // Holds all the needed plugin window moves for a scroll. |
| 259 std::vector<WebPluginGeometry> plugin_window_moves_; | 261 std::vector<WebPluginGeometry> plugin_window_moves_; |
| 260 | 262 |
| 261 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); | 263 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); |
| 262 }; | 264 }; |
| 263 | 265 |
| 264 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ | 266 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ |
| OLD | NEW |