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

Unified Diff: ui/snapshot/snapshot.h

Issue 119753007: Add GrabWindowSnapshotAsync tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, compiling Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | ui/snapshot/snapshot_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/snapshot.h
diff --git a/ui/snapshot/snapshot.h b/ui/snapshot/snapshot.h
index d6fb6b8b0183326b7b2414e050d1f17bac2dc918..7ccd8b4ac58e54859cb323dffd1f4744bc3c4a25 100644
--- a/ui/snapshot/snapshot.h
+++ b/ui/snapshot/snapshot.h
@@ -28,7 +28,7 @@ namespace ui {
// intended to be used for debugging purposes where no BrowserProcess instance
// is available (ie. tests). This function is synchronous, so it should NOT be
// used in a result of user action. Use asynchronous GrabWindowSnapshotAsync()
-// instead.
+// instead on supported platforms.
SNAPSHOT_EXPORT bool GrabWindowSnapshot(
gfx::NativeWindow window,
std::vector<unsigned char>* png_representation,
@@ -39,16 +39,21 @@ SNAPSHOT_EXPORT bool GrabViewSnapshot(
std::vector<unsigned char>* png_representation,
const gfx::Rect& snapshot_bounds);
-// GrabWindowSnapshotAsync() copies snapshot of |source_rect| from window and
-// scales it to |target_size| asynchronously.
typedef base::Callback<void(const gfx::Image& snapshot)>
GrabWindowSnapshotAsyncCallback;
-SNAPSHOT_EXPORT void GrabWindowSnapshotAsync(
+// GrabWindowSnapshotAndScaleAsync() copies snapshot of |source_rect| from
+// window and scales it to |target_size| asynchronously.
+SNAPSHOT_EXPORT void GrabWindowSnapshotAndScaleAsync(
gfx::NativeWindow window,
const gfx::Rect& source_rect,
const gfx::Size& target_size,
scoped_refptr<base::TaskRunner> background_task_runner,
const GrabWindowSnapshotAsyncCallback& callback);
+SNAPSHOT_EXPORT void GrabWindowSnapshotAsync(
+ gfx::NativeWindow window,
+ const gfx::Rect& source_rect,
+ scoped_refptr<base::TaskRunner> background_task_runner,
+ const GrabWindowSnapshotAsyncCallback& callback);
} // namespace ui
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | ui/snapshot/snapshot_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698