| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // WebKit::WebWidgetClient | 115 // WebKit::WebWidgetClient |
| 116 virtual void willBeginCompositorFrame(); | 116 virtual void willBeginCompositorFrame(); |
| 117 virtual void didInvalidateRect(const WebKit::WebRect&); | 117 virtual void didInvalidateRect(const WebKit::WebRect&); |
| 118 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect); | 118 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect); |
| 119 virtual void didAutoResize(const WebKit::WebSize& new_size); | 119 virtual void didAutoResize(const WebKit::WebSize& new_size); |
| 120 virtual void didActivateCompositor(int input_handler_identifier); | 120 virtual void didActivateCompositor(int input_handler_identifier); |
| 121 virtual void didDeactivateCompositor(); | 121 virtual void didDeactivateCompositor(); |
| 122 virtual void didBecomeReadyForAdditionalInput(); | 122 virtual void didBecomeReadyForAdditionalInput(); |
| 123 virtual void didCommitAndDrawCompositorFrame(); | 123 virtual void didCommitAndDrawCompositorFrame(); |
| 124 virtual void didCompleteSwapBuffers(); | 124 virtual void didCompleteSwapBuffers(); |
| 125 #if defined(WEBWIDGETCLIENT_SCHEDULECOMPOSITE_RETURNS_BOOL) |
| 126 virtual bool scheduleComposite(); |
| 127 #else |
| 125 virtual void scheduleComposite(); | 128 virtual void scheduleComposite(); |
| 129 #endif |
| 126 virtual void scheduleAnimation(); | 130 virtual void scheduleAnimation(); |
| 127 virtual void didFocus(); | 131 virtual void didFocus(); |
| 128 virtual void didBlur(); | 132 virtual void didBlur(); |
| 129 virtual void didChangeCursor(const WebKit::WebCursorInfo&); | 133 virtual void didChangeCursor(const WebKit::WebCursorInfo&); |
| 130 virtual void closeWidgetSoon(); | 134 virtual void closeWidgetSoon(); |
| 131 virtual void show(WebKit::WebNavigationPolicy); | 135 virtual void show(WebKit::WebNavigationPolicy); |
| 132 virtual void runModal() {} | 136 virtual void runModal() {} |
| 133 virtual WebKit::WebRect windowRect(); | 137 virtual WebKit::WebRect windowRect(); |
| 134 virtual void setToolTipText(const WebKit::WebString& text, | 138 virtual void setToolTipText(const WebKit::WebString& text, |
| 135 WebKit::WebTextDirection hint); | 139 WebKit::WebTextDirection hint); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 204 |
| 201 bool IsRenderingVSynced(); | 205 bool IsRenderingVSynced(); |
| 202 void AnimationCallback(); | 206 void AnimationCallback(); |
| 203 void AnimateIfNeeded(); | 207 void AnimateIfNeeded(); |
| 204 void InvalidationCallback(); | 208 void InvalidationCallback(); |
| 205 void DoDeferredUpdateAndSendInputAck(); | 209 void DoDeferredUpdateAndSendInputAck(); |
| 206 void DoDeferredUpdate(); | 210 void DoDeferredUpdate(); |
| 207 void DoDeferredClose(); | 211 void DoDeferredClose(); |
| 208 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); | 212 void DoDeferredSetWindowRect(const WebKit::WebRect& pos); |
| 209 | 213 |
| 214 // Returns true if a deferred update is possible. |
| 215 bool CanDoDeferredUpdate() const; |
| 216 |
| 217 // Returns true if a deferred update should be suppressed, even if possible. |
| 218 bool ShouldSuppressDeferredUpdates() const; |
| 219 |
| 210 // Set the background of the render widget to a bitmap. The bitmap will be | 220 // Set the background of the render widget to a bitmap. The bitmap will be |
| 211 // tiled in both directions if it isn't big enough to fill the area. This is | 221 // tiled in both directions if it isn't big enough to fill the area. This is |
| 212 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). | 222 // mainly intended to be used in conjuction with WebView::SetIsTransparent(). |
| 213 virtual void SetBackground(const SkBitmap& bitmap); | 223 virtual void SetBackground(const SkBitmap& bitmap); |
| 214 | 224 |
| 215 // Resizes the render widget. | 225 // Resizes the render widget. |
| 216 void Resize(const gfx::Size& new_size, | 226 void Resize(const gfx::Size& new_size, |
| 217 const gfx::Rect& resizer_rect, | 227 const gfx::Rect& resizer_rect, |
| 218 bool is_fullscreen, | 228 bool is_fullscreen, |
| 219 ResizeAck resize_ack); | 229 ResizeAck resize_ack); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 // Set to true if we should invert all pixels. | 529 // Set to true if we should invert all pixels. |
| 520 bool invert_; | 530 bool invert_; |
| 521 | 531 |
| 522 // The Skia paint object for inverting. | 532 // The Skia paint object for inverting. |
| 523 scoped_ptr<SkPaint> invert_paint_; | 533 scoped_ptr<SkPaint> invert_paint_; |
| 524 | 534 |
| 525 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 535 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 526 }; | 536 }; |
| 527 | 537 |
| 528 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 538 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |