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

Unified Diff: content/public/browser/fileapi/blob_context.h

Issue 266373006: Blobs: Mechanism for creating Blobs in browser process, then transferring to renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self review fixes 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 | « content/public/browser/browser_context.h ('k') | extensions/common/extension_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/fileapi/blob_context.h
diff --git a/content/public/browser/fileapi/blob_context.h b/content/public/browser/fileapi/blob_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..0d7d861ba013b4ccc4a3fcb5f1ba4e49f1cfdee7
--- /dev/null
+++ b/content/public/browser/fileapi/blob_context.h
@@ -0,0 +1,32 @@
+// 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_PUBLIC_BROWSER_FILEAPI_BLOB_CONTEXT_H_
+#define CONTENT_PUBLIC_BROWSER_FILEAPI_BLOB_CONTEXT_H_
michaeln 2014/05/08 21:11:57 It may make more sense to put this in public/brows
tommycli 2014/05/08 22:43:03 Done.
+
+#include "base/callback_forward.h"
+#include "content/common/content_export.h"
+
+namespace webkit_blob {
michaeln 2014/05/08 21:11:57 I think we'll also need a content api wrapper for
tommycli 2014/05/08 22:43:03 Done.
+class BlobDataHandle;
+}
+
+namespace content {
+
+// Used to coin Blobs in the browser process. For use on the UI thread.
+class CONTENT_EXPORT BlobContext {
+ public:
+ typedef base::Callback<
+ void(scoped_ptr<webkit_blob::BlobDataHandle>)> BlobCallback;
+
+ virtual void CreateMemoryBackedBlob(
+ const char* data, size_t length, const BlobCallback& callback) = 0;
+
+ protected:
+ virtual ~BlobContext() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_FILEAPI_BLOB_CONTEXT_H_
« no previous file with comments | « content/public/browser/browser_context.h ('k') | extensions/common/extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698