Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: content/public/browser/render_widget_host.h

Issue 174323003: Expose locks for CopyFromCompositingSurface/CopyFromBackingStore API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reworded and added comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 virtual bool CanCopyFromBackingStore() = 0;
jam 2014/02/26 00:09:54 so to be clear, this is in the public api since ch
no sievers 2014/02/26 00:25:56 Actually we don't have to add this one. It already
powei 2014/02/26 18:42:38 I thought it would make sense that the user would
204 // Ensures that the view does not drop the backing store even when hidden.
205 virtual void LockForCopyFromBackingStore() = 0;
206 virtual void UnlockForCopyFromBackingStore() = 0;
jam 2014/02/26 00:09:54 I'm sure there's a reason why you're exposing thes
no sievers 2014/02/26 00:25:56 The problem is that the application wants to repla
jam 2014/02/26 17:37:29 I'm not familiar with this part of the code, so I
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698