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

Unified Diff: ui/snapshot/snapshot_async.h

Issue 281003002: Make ui::Snapshot asynchronous on Android, remove CompositeAndReadback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pixeltests: syntax Created 6 years, 7 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/snapshot/snapshot_android.cc ('k') | ui/snapshot/snapshot_async.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/snapshot_async.h
diff --git a/ui/snapshot/snapshot_async.h b/ui/snapshot/snapshot_async.h
new file mode 100644
index 0000000000000000000000000000000000000000..41da62ba2ac0e07ace0e5caad10b433457e9f4e7
--- /dev/null
+++ b/ui/snapshot/snapshot_async.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
+#define UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
+
+#include "cc/output/copy_output_result.h"
+#include "ui/snapshot/snapshot.h"
+
+namespace base {
+class TaskRunner;
+}
+
+namespace gfx {
+class Size;
+}
+
+namespace ui {
+
+// Helper methods for async snapshots to convert a cc::CopyOutputResult into a
+// ui::GrabWindowSnapshot callback.
+class SnapshotAsync {
+ public:
+ static void ScaleCopyOutputResult(
+ const GrabWindowSnapshotAsyncCallback& callback,
+ const gfx::Size& target_size,
+ scoped_refptr<base::TaskRunner> background_task_runner,
+ scoped_ptr<cc::CopyOutputResult> result);
+
+ static void EncodeCopyOutputResult(
+ const GrabWindowSnapshotAsyncPNGCallback& callback,
+ scoped_refptr<base::TaskRunner> background_task_runner,
+ scoped_ptr<cc::CopyOutputResult> result);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(SnapshotAsync);
+};
+
+} // namespace ui
+
+#endif // UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
« no previous file with comments | « ui/snapshot/snapshot_android.cc ('k') | ui/snapshot/snapshot_async.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698