Chromium Code Reviews| 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/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 // source contents is used. |callback| is invoked with true on success, false | 193 // source contents is used. |callback| is invoked with true on success, false |
| 194 // otherwise, along with a SkBitmap containing the copied pixel data. | 194 // otherwise, along with a SkBitmap containing the copied pixel data. |
| 195 // | 195 // |
| 196 // NOTE: |callback| is called synchronously if the backing store is available. | 196 // NOTE: |callback| is called synchronously if the backing store is available. |
| 197 // When accelerated compositing is active, |callback| may be called | 197 // When accelerated compositing is active, |callback| may be called |
| 198 // asynchronously. | 198 // asynchronously. |
| 199 virtual void CopyFromBackingStore( | 199 virtual void CopyFromBackingStore( |
| 200 const gfx::Rect& src_rect, | 200 const gfx::Rect& src_rect, |
| 201 const gfx::Size& accelerated_dst_size, | 201 const gfx::Size& accelerated_dst_size, |
| 202 const base::Callback<void(bool, const SkBitmap&)>& callback) = 0; | 202 const base::Callback<void(bool, const SkBitmap&)>& callback) = 0; |
| 203 // Ensures that the view does not drop the backing store even when hidden. | |
|
jam
2014/02/26 22:57:52
perhaps these methods should be in an OS_ANDROID i
powei
2014/03/03 09:20:54
Done.
| |
| 204 virtual bool CanCopyFromBackingStore() = 0; | |
| 205 virtual void LockForCopyFromBackingStore() = 0; | |
| 206 virtual void UnlockForCopyFromBackingStore() = 0; | |
| 203 #if defined(TOOLKIT_GTK) | 207 #if defined(TOOLKIT_GTK) |
| 204 // Paint the backing store into the target's |dest_rect|. | 208 // Paint the backing store into the target's |dest_rect|. |
| 205 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, | 209 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, |
| 206 GdkWindow* target) = 0; | 210 GdkWindow* target) = 0; |
| 207 #elif defined(OS_MACOSX) | 211 #elif defined(OS_MACOSX) |
| 208 virtual gfx::Size GetBackingStoreSize() = 0; | 212 virtual gfx::Size GetBackingStoreSize() = 0; |
| 209 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, | 213 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, |
| 210 CGContextRef target) = 0; | 214 CGContextRef target) = 0; |
| 211 #endif | 215 #endif |
| 212 | 216 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 // within content/. This method is necessary because | 307 // within content/. This method is necessary because |
| 304 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 308 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 305 // subclasses inherit it virtually, which removes our ability to | 309 // subclasses inherit it virtually, which removes our ability to |
| 306 // static_cast to the subclass. | 310 // static_cast to the subclass. |
| 307 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 311 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 308 }; | 312 }; |
| 309 | 313 |
| 310 } // namespace content | 314 } // namespace content |
| 311 | 315 |
| 312 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 316 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |