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" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void DoDeferredPaint(); | 113 void DoDeferredPaint(); |
114 void DoDeferredScroll(); | 114 void DoDeferredScroll(); |
115 | 115 |
116 // This method is called immediately after PaintRect but before the | 116 // This method is called immediately after PaintRect but before the |
117 // corresponding paint or scroll message is send to the widget host. | 117 // corresponding paint or scroll message is send to the widget host. |
118 virtual void DidPaint() {} | 118 virtual void DidPaint() {} |
119 | 119 |
120 // RenderWidget IPC message handlers | 120 // RenderWidget IPC message handlers |
121 void OnClose(); | 121 void OnClose(); |
122 void OnCreatingNewAck(gfx::NativeViewId parent); | 122 void OnCreatingNewAck(gfx::NativeViewId parent); |
123 void OnResize(const gfx::Size& new_size); | 123 void OnResize(const gfx::Size& new_size, const gfx::Rect& resizer_rect); |
124 void OnWasHidden(); | 124 void OnWasHidden(); |
125 void OnWasRestored(bool needs_repainting); | 125 void OnWasRestored(bool needs_repainting); |
126 void OnPaintRectAck(); | 126 void OnPaintRectAck(); |
127 void OnScrollRectAck(); | 127 void OnScrollRectAck(); |
128 void OnHandleInputEvent(const IPC::Message& message); | 128 void OnHandleInputEvent(const IPC::Message& message); |
129 void OnMouseCaptureLost(); | 129 void OnMouseCaptureLost(); |
130 void OnSetFocus(bool enable); | 130 void OnSetFocus(bool enable); |
131 void OnImeSetInputMode(bool is_active); | 131 void OnImeSetInputMode(bool is_active); |
132 void OnImeSetComposition(int string_type, int cursor_position, | 132 void OnImeSetComposition(int string_type, int cursor_position, |
133 int target_start, int target_end, | 133 int target_start, int target_end, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 base::SharedMemory* current_scroll_buf_; | 197 base::SharedMemory* current_scroll_buf_; |
198 | 198 |
199 // The smallest bounding rectangle that needs to be re-painted. This is non- | 199 // The smallest bounding rectangle that needs to be re-painted. This is non- |
200 // empty if a paint event is pending. | 200 // empty if a paint event is pending. |
201 gfx::Rect paint_rect_; | 201 gfx::Rect paint_rect_; |
202 | 202 |
203 // The clip rect for the pending scroll event. This is non-empty if a | 203 // The clip rect for the pending scroll event. This is non-empty if a |
204 // scroll event is pending. | 204 // scroll event is pending. |
205 gfx::Rect scroll_rect_; | 205 gfx::Rect scroll_rect_; |
206 | 206 |
| 207 // The area that must be reserved for drawing the resize corner. |
| 208 gfx::Rect resizer_rect_; |
| 209 |
207 // The scroll delta for a pending scroll event. | 210 // The scroll delta for a pending scroll event. |
208 gfx::Point scroll_delta_; | 211 gfx::Point scroll_delta_; |
209 | 212 |
210 // Flags for the next ViewHostMsg_PaintRect message. | 213 // Flags for the next ViewHostMsg_PaintRect message. |
211 int next_paint_flags_; | 214 int next_paint_flags_; |
212 | 215 |
213 // True if we are expecting a PaintRect_ACK message (i.e., that a PaintRect | 216 // True if we are expecting a PaintRect_ACK message (i.e., that a PaintRect |
214 // message has been sent). | 217 // message has been sent). |
215 bool paint_reply_pending_; | 218 bool paint_reply_pending_; |
216 | 219 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 258 |
256 // Whether the window for this RenderWidget can be activated. | 259 // Whether the window for this RenderWidget can be activated. |
257 bool activatable_; | 260 bool activatable_; |
258 | 261 |
259 // Holds all the needed plugin window moves for a scroll. | 262 // Holds all the needed plugin window moves for a scroll. |
260 std::vector<WebPluginGeometry> plugin_window_moves_; | 263 std::vector<WebPluginGeometry> plugin_window_moves_; |
261 | 264 |
262 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); | 265 DISALLOW_EVIL_CONSTRUCTORS(RenderWidget); |
263 }; | 266 }; |
264 | 267 |
265 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ | 268 #endif // CHROME_RENDERER_RENDER_WIDGET_H__ |
OLD | NEW |