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

Unified Diff: chrome/browser/ui/window_snapshot/window_snapshot.cc

Issue 126373002: Make ChromeOS screenshots use async readback path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
Index: chrome/browser/ui/window_snapshot/window_snapshot.cc
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot.cc b/chrome/browser/ui/window_snapshot/window_snapshot.cc
index 889d97d57c04d63c9bf23d1abff68334c6610b35..ab984778bf24df164b7a165673a88e62a9449e42 100644
--- a/chrome/browser/ui/window_snapshot/window_snapshot.cc
+++ b/chrome/browser/ui/window_snapshot/window_snapshot.cc
@@ -22,6 +22,17 @@ bool GrabWindowSnapshotForUser(
snapshot_bounds);
}
+void GrabWindowSnapshotForUserAsync(
Jun Mukai 2014/01/09 01:19:32 I am not sure we need to declare this if the only
enne (OOO) 2014/01/09 02:47:51 That's a good point. I'll remove this now and the
enne (OOO) 2014/01/09 19:38:42 Here's the followup to clean up window_snapshot on
+ gfx::NativeWindow window,
+ const gfx::Rect& snapshot_bounds,
+ scoped_refptr<base::TaskRunner> background_task_runner,
+ ui::GrabWindowSnapshotAsyncPNGCallback callback) {
+ if (g_browser_process->local_state()->GetBoolean(prefs::kDisableScreenshots))
+ callback.Run(scoped_refptr<base::RefCountedBytes>());
+ ui::GrabWindowSnapshotAsync(
+ window, snapshot_bounds, background_task_runner, callback);
+}
+
void RegisterScreenshotPrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
}

Powered by Google App Engine
This is Rietveld 408576698