OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual bool OnMessageReceived(const IPC::Message& msg); | 95 virtual bool OnMessageReceived(const IPC::Message& msg); |
96 | 96 |
97 // IPC::Message::Sender | 97 // IPC::Message::Sender |
98 virtual bool Send(IPC::Message* msg); | 98 virtual bool Send(IPC::Message* msg); |
99 | 99 |
100 // WebKit::WebWidgetClient | 100 // WebKit::WebWidgetClient |
101 virtual void didInvalidateRect(const WebKit::WebRect&); | 101 virtual void didInvalidateRect(const WebKit::WebRect&); |
102 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect); | 102 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect); |
103 virtual void didActivateAcceleratedCompositing(bool active); | 103 virtual void didActivateAcceleratedCompositing(bool active); |
104 virtual void scheduleComposite(); | 104 virtual void scheduleComposite(); |
| 105 virtual void scheduleAnimation(); |
105 virtual void didFocus(); | 106 virtual void didFocus(); |
106 virtual void didBlur(); | 107 virtual void didBlur(); |
107 virtual void didChangeCursor(const WebKit::WebCursorInfo&); | 108 virtual void didChangeCursor(const WebKit::WebCursorInfo&); |
108 virtual void closeWidgetSoon(); | 109 virtual void closeWidgetSoon(); |
109 virtual void show(WebKit::WebNavigationPolicy); | 110 virtual void show(WebKit::WebNavigationPolicy); |
110 virtual void runModal() {} | 111 virtual void runModal() {} |
111 virtual WebKit::WebRect windowRect(); | 112 virtual WebKit::WebRect windowRect(); |
112 virtual void setWindowRect(const WebKit::WebRect&); | 113 virtual void setWindowRect(const WebKit::WebRect&); |
113 virtual WebKit::WebRect windowResizerRect(); | 114 virtual WebKit::WebRect windowResizerRect(); |
114 virtual WebKit::WebRect rootWindowRect(); | 115 virtual WebKit::WebRect rootWindowRect(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Paints the given rectangular region of the WebWidget into canvas (a | 153 // Paints the given rectangular region of the WebWidget into canvas (a |
153 // shared memory segment returned by AllocPaintBuf on Windows). The caller | 154 // shared memory segment returned by AllocPaintBuf on Windows). The caller |
154 // must ensure that the given rect fits within the bounds of the WebWidget. | 155 // must ensure that the given rect fits within the bounds of the WebWidget. |
155 void PaintRect(const gfx::Rect& rect, const gfx::Point& canvas_origin, | 156 void PaintRect(const gfx::Rect& rect, const gfx::Point& canvas_origin, |
156 skia::PlatformCanvas* canvas); | 157 skia::PlatformCanvas* canvas); |
157 | 158 |
158 // Paints a border at the given rect for debugging purposes. | 159 // Paints a border at the given rect for debugging purposes. |
159 void PaintDebugBorder(const gfx::Rect& rect, skia::PlatformCanvas* canvas); | 160 void PaintDebugBorder(const gfx::Rect& rect, skia::PlatformCanvas* canvas); |
160 | 161 |
161 void CallDoDeferredUpdate(); | 162 void CallDoDeferredUpdate(); |
| 163 void UpdateAnimationsIfNeeded(); |
162 void DoDeferredUpdate(); | 164 void DoDeferredUpdate(); |
163 void DoDeferredClose(); | 165 void DoDeferredClose(); |
164 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); | 166 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); |
165 | 167 |
166 // Set the background of the render widget to a bitmap. The bitmap will be | 168 // Set the background of the render widget to a bitmap. The bitmap will be |
167 // tiled in both directions if it isn't big enough to fill the area. This is | 169 // tiled in both directions if it isn't big enough to fill the area. This is |
168 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). | 170 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). |
169 virtual void SetBackground(const SkBitmap& bitmap); | 171 virtual void SetBackground(const SkBitmap& bitmap); |
170 | 172 |
171 // RenderWidget IPC message handlers | 173 // RenderWidget IPC message handlers |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 359 |
358 scoped_ptr<IPC::Message> pending_input_event_ack_; | 360 scoped_ptr<IPC::Message> pending_input_event_ack_; |
359 | 361 |
360 // Indicates if the next sequence of Char events should be suppressed or not. | 362 // Indicates if the next sequence of Char events should be suppressed or not. |
361 bool suppress_next_char_events_; | 363 bool suppress_next_char_events_; |
362 | 364 |
363 // Set to true if painting to the window is handled by the accelerated | 365 // Set to true if painting to the window is handled by the accelerated |
364 // compositor. | 366 // compositor. |
365 bool is_accelerated_compositing_active_; | 367 bool is_accelerated_compositing_active_; |
366 | 368 |
| 369 base::Time animation_floor_time_; |
| 370 bool animation_update_pending_; |
| 371 |
367 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 372 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
368 }; | 373 }; |
369 | 374 |
370 #endif // CHROME_RENDERER_RENDER_WIDGET_H_ | 375 #endif // CHROME_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |