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 "chrome/common/ipc_channel.h" | 16 #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 return ViewHostMsg_PaintRect_Flags::is_resize_ack(next_paint_flags_); | 148 bool next_paint_is_restore_ack() const; |
149 } | 149 void set_next_paint_is_resize_ack(); |
150 | 150 void set_next_paint_is_restore_ack(); |
151 bool next_paint_is_restore_ack() const { | 151 void set_next_paint_is_repaint_ack(); |
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 } | |
166 | 152 |
167 // Called when a renderer process moves an input focus or updates the | 153 // Called when a renderer process moves an input focus or updates the |
168 // position of its caret. | 154 // position of its caret. |
169 // This function compares them with the previous values, and send them to | 155 // This function compares them with the previous values, and send them to |
170 // the browser process only if they are updated. | 156 // the browser process only if they are updated. |
171 // The browser process moves IME windows and context. | 157 // The browser process moves IME windows and context. |
172 void UpdateIME(); | 158 void UpdateIME(); |
173 | 159 |
174 // Tells the renderer it does not have focus. Used to prevent us from getting | 160 // Tells the renderer it does not have focus. Used to prevent us from getting |
175 // the focus on our own when the browser did not focus us. | 161 // 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... |
270 // Whether the window for this RenderWidget can be activated. | 256 // Whether the window for this RenderWidget can be activated. |
271 bool activatable_; | 257 bool activatable_; |
272 | 258 |
273 // Holds all the needed plugin window moves for a scroll. | 259 // Holds all the needed plugin window moves for a scroll. |
274 std::vector<WebPluginGeometry> plugin_window_moves_; | 260 std::vector<WebPluginGeometry> plugin_window_moves_; |
275 | 261 |
276 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); | 262 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); |
277 }; | 263 }; |
278 | 264 |
279 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ | 265 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ |
OLD | NEW |