| 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" | |
| 16 #include "chrome/common/ipc_channel.h" | 15 #include "chrome/common/ipc_channel.h" |
| 16 #include "chrome/common/render_messages.h" |
| 17 #include "skia/ext/platform_canvas.h" | 17 #include "skia/ext/platform_canvas.h" |
| 18 | 18 |
| 19 #include "webkit/glue/webwidget_delegate.h" | 19 #include "webkit/glue/webwidget_delegate.h" |
| 20 #include "webkit/glue/webcursor.h" | 20 #include "webkit/glue/webcursor.h" |
| 21 #include "webkit/glue/webplugin.h" | 21 #include "webkit/glue/webplugin.h" |
| 22 | 22 |
| 23 class RenderThreadBase; | 23 class RenderThreadBase; |
| 24 | 24 |
| 25 // RenderWidget provides a communication bridge between a WebWidget and | 25 // RenderWidget provides a communication bridge between a WebWidget and |
| 26 // a RenderWidgetHost, the latter of which lives in a different process. | 26 // a RenderWidgetHost, the latter of which lives in a different process. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // True if a PaintRect_ACK message is pending. | 137 // True if a PaintRect_ACK message is pending. |
| 138 bool paint_reply_pending() const { | 138 bool paint_reply_pending() const { |
| 139 return paint_reply_pending_; | 139 return paint_reply_pending_; |
| 140 } | 140 } |
| 141 | 141 |
| 142 // True if a ScrollRect_ACK message is pending. | 142 // True if a ScrollRect_ACK message is pending. |
| 143 bool scroll_reply_pending() const { | 143 bool scroll_reply_pending() const { |
| 144 return current_scroll_buf_ != NULL; | 144 return current_scroll_buf_ != NULL; |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool next_paint_is_resize_ack() const; | 147 bool next_paint_is_resize_ack() const { |
| 148 bool next_paint_is_restore_ack() const; | 148 return ViewHostMsg_PaintRect_Flags::is_resize_ack(next_paint_flags_); |
| 149 void set_next_paint_is_resize_ack(); | 149 } |
| 150 void set_next_paint_is_restore_ack(); | 150 |
| 151 void set_next_paint_is_repaint_ack(); | 151 bool next_paint_is_restore_ack() const { |
| 152 return ViewHostMsg_PaintRect_Flags::is_restore_ack(next_paint_flags_); |
| 153 } |
| 154 |
| 155 void set_next_paint_is_resize_ack() { |
| 156 next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_RESIZE_ACK; |
| 157 } |
| 158 |
| 159 void set_next_paint_is_restore_ack() { |
| 160 next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_RESTORE_ACK; |
| 161 } |
| 162 |
| 163 void set_next_paint_is_repaint_ack() { |
| 164 next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_REPAINT_ACK; |
| 165 } |
| 152 | 166 |
| 153 // Called when a renderer process moves an input focus or updates the | 167 // Called when a renderer process moves an input focus or updates the |
| 154 // position of its caret. | 168 // position of its caret. |
| 155 // This function compares them with the previous values, and send them to | 169 // This function compares them with the previous values, and send them to |
| 156 // the browser process only if they are updated. | 170 // the browser process only if they are updated. |
| 157 // The browser process moves IME windows and context. | 171 // The browser process moves IME windows and context. |
| 158 void UpdateIME(); | 172 void UpdateIME(); |
| 159 | 173 |
| 160 // Tells the renderer it does not have focus. Used to prevent us from getting | 174 // Tells the renderer it does not have focus. Used to prevent us from getting |
| 161 // the focus on our own when the browser did not focus us. | 175 // the focus on our own when the browser did not focus us. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // Whether the window for this RenderWidget can be activated. | 270 // Whether the window for this RenderWidget can be activated. |
| 257 bool activatable_; | 271 bool activatable_; |
| 258 | 272 |
| 259 // Holds all the needed plugin window moves for a scroll. | 273 // Holds all the needed plugin window moves for a scroll. |
| 260 std::vector<WebPluginGeometry> plugin_window_moves_; | 274 std::vector<WebPluginGeometry> plugin_window_moves_; |
| 261 | 275 |
| 262 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); | 276 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); |
| 263 }; | 277 }; |
| 264 | 278 |
| 265 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ | 279 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ |
| OLD | NEW |