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

Unified Diff: content/common/readback_types.h

Issue 593503003: Support error handling for Surface readbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary headers. Created 6 years, 3 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: content/common/readback_types.h
diff --git a/content/common/readback_types.h b/content/common/readback_types.h
new file mode 100644
index 0000000000000000000000000000000000000000..6cf128cb3ad595053073a1cbe77d986924ccd736
--- /dev/null
+++ b/content/common/readback_types.h
@@ -0,0 +1,29 @@
+// 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 CONTENT_COMMON_READBACK_TYPES_H_
piman 2014/10/02 18:08:26 This file should go into content/public/browser, s
sivag 2014/11/06 13:34:16 Done.
+#define CONTENT_COMMON_READBACK_TYPES_H_
+
+#include "base/callback.h"
+
+class SkBitmap;
+
+namespace content {
+
+enum ReadbackResponse {
+ READBACK_SUCCESS,
+ READBACK_FAILED,
+ READBACK_FORMAT_NOT_SUPPORTED,
+ READBACK_NOTSUPPORTED,
piman 2014/10/02 18:08:26 nit: NOT_SUPPORTED ?
sivag 2014/11/06 13:34:16 Done.
+ READBACK_SURFACE_UNAVAILABLE,
+ READBACK_RESULT_EMPTY,
piman 2014/10/02 18:08:26 I don't think we need both RESULT_EMPTY and FAILED
sivag 2014/11/06 13:34:16 Done.
+ READBACK_MEMORY_ALLOCATION_FAILURE,
+};
+
+typedef const base::Callback<void(bool, const SkBitmap&, const int&)>
piman 2014/10/02 18:08:26 Why int instead of ReadbackResponse?
piman 2014/10/02 18:08:26 We shouldn't need both the bool and the ReadbackRe
sivag 2014/11/06 13:34:16 Done.
sivag 2014/11/06 13:34:16 Done.
+ CopyFromCompositingSurfaceCallback;
piman 2014/10/02 18:08:26 We should be consistent in the naming, "Copy" vs "
sivag 2014/11/06 13:34:16 Done.
+
+} // namespace
+
+#endif // CONTENT_COMMON_READBACK_TYPES_H_
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.h ('k') | content/public/browser/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698