| 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "app/surface/transport_dib.h" |
| 9 |
| 8 class BackingStore; | 10 class BackingStore; |
| 9 class RenderWidgetHost; | 11 class RenderWidgetHost; |
| 12 class SkBitmap; |
| 13 |
| 14 namespace gfx { |
| 15 class Size; |
| 16 } |
| 10 | 17 |
| 11 // This class can be used to observe painting events for a RenderWidgetHost. | 18 // This class can be used to observe painting events for a RenderWidgetHost. |
| 12 // Its primary goal in Chrome is to allow thumbnails to be generated. | 19 // Its primary goal in Chrome is to allow thumbnails to be generated. |
| 13 class RenderWidgetHostPaintingObserver { | 20 class RenderWidgetHostPaintingObserver { |
| 14 public: | 21 public: |
| 15 // Indicates the RenderWidgetHost is about to destroy the backing store. The | 22 // Indicates the RenderWidgetHost is about to destroy the backing store. The |
| 16 // backing store will still be valid when this call is made. | 23 // backing store will still be valid when this call is made. |
| 17 virtual void WidgetWillDestroyBackingStore(RenderWidgetHost* widget, | 24 virtual void WidgetWillDestroyBackingStore(RenderWidgetHost* widget, |
| 18 BackingStore* backing_store) = 0; | 25 BackingStore* backing_store) = 0; |
| 19 | 26 |
| 20 // Indicates that the RenderWidgetHost just updated the backing store. | 27 // Indicates that the RenderWidgetHost just updated the backing store. |
| 21 virtual void WidgetDidUpdateBackingStore(RenderWidgetHost* widget) = 0; | 28 virtual void WidgetDidUpdateBackingStore(RenderWidgetHost* widget) = 0; |
| 29 |
| 30 // This notifies the painting observer that a PaintAtSizeACK was |
| 31 // received. |
| 32 virtual void WidgetDidReceivePaintAtSizeAck( |
| 33 RenderWidgetHost* widget, |
| 34 const TransportDIB::Handle& dib_handle, |
| 35 const gfx::Size& size) = 0; |
| 22 }; | 36 }; |
| 23 | 37 |
| 24 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ | 38 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_PAINTING_OBSERVER_H_ |
| OLD | NEW |