| 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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 
| 7 | 7 | 
| 8 #include "base/callback.h" | 8 #include "base/callback.h" | 
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" | 
| 10 #include "content/public/browser/keyboard_listener.h" | 10 #include "content/public/browser/keyboard_listener.h" | 
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 174 | 174 | 
| 175   // Copies the given subset of the backing store, and passes the result as a | 175   // Copies the given subset of the backing store, and passes the result as a | 
| 176   // bitmap to a callback. | 176   // bitmap to a callback. | 
| 177   // | 177   // | 
| 178   // If |src_rect| is empty, the whole contents is copied. If non empty | 178   // If |src_rect| is empty, the whole contents is copied. If non empty | 
| 179   // |accelerated_dst_size| is given and accelerated compositing is active, the | 179   // |accelerated_dst_size| is given and accelerated compositing is active, the | 
| 180   // content is shrunk so that it fits in |accelerated_dst_size|. If | 180   // content is shrunk so that it fits in |accelerated_dst_size|. If | 
| 181   // |accelerated_dst_size| is larger than the content size, the content is not | 181   // |accelerated_dst_size| is larger than the content size, the content is not | 
| 182   // resized. If |accelerated_dst_size| is empty, the size copied from the | 182   // resized. If |accelerated_dst_size| is empty, the size copied from the | 
| 183   // source contents is used. |callback| is invoked with true on success, false | 183   // source contents is used. |callback| is invoked with true on success, false | 
| 184   // otherwise, along with a SkBitmap containing the copied pixel data. | 184   // otherwise, along with a SkBitmap containing the copied pixel data. If | 
|  | 185   // accelerated compositing is active, but the surface is not available to the | 
|  | 186   // browser, then the copy is done on the renderer side via IPC. | 
| 185   // | 187   // | 
| 186   // NOTE: |callback| is called synchronously if the backing store is available. | 188   // NOTE: |callback| is called synchronously if the backing store is available. | 
| 187   // When accelerated compositing is active, |callback| may be called | 189   // When accelerated compositing is active, |callback| may be called | 
| 188   // asynchronously. | 190   // asynchronously. | 
| 189   virtual void CopyFromBackingStore( | 191   virtual void CopyFromBackingStore( | 
| 190       const gfx::Rect& src_rect, | 192       const gfx::Rect& src_rect, | 
| 191       const gfx::Size& accelerated_dst_size, | 193       const gfx::Size& accelerated_dst_size, | 
| 192       const base::Callback<void(bool, const SkBitmap&)>& callback) = 0; | 194       const base::Callback<void(bool, const SkBitmap&)>& callback) = 0; | 
| 193 #if defined(TOOLKIT_GTK) | 195 #if defined(TOOLKIT_GTK) | 
| 194   // Paint the backing store into the target's |dest_rect|. | 196   // Paint the backing store into the target's |dest_rect|. | 
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 291   // within content/.  This method is necessary because | 293   // within content/.  This method is necessary because | 
| 292   // RenderWidgetHost is the root of a diamond inheritance pattern, so | 294   // RenderWidgetHost is the root of a diamond inheritance pattern, so | 
| 293   // subclasses inherit it virtually, which removes our ability to | 295   // subclasses inherit it virtually, which removes our ability to | 
| 294   // static_cast to the subclass. | 296   // static_cast to the subclass. | 
| 295   virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 297   virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 
| 296 }; | 298 }; | 
| 297 | 299 | 
| 298 }  // namespace content | 300 }  // namespace content | 
| 299 | 301 | 
| 300 #endif  // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 302 #endif  // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 
| OLD | NEW | 
|---|