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

Unified Diff: content/public/browser/browser_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: remove stray lines 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/blob_handle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_context.h
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 0a022e4066e8162fe546133dfb22acf869ed1398..7ff172d5447b8f4803e1d39ba095ef2ad2dab97a 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -31,6 +31,7 @@ class SpecialStoragePolicy;
namespace content {
+class BlobHandle;
class BrowserPluginGuestManager;
class DownloadManager;
class DownloadManagerDelegate;
@@ -45,6 +46,8 @@ class StoragePartition;
// thread.
class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
public:
+ typedef base::Callback<void(scoped_ptr<BlobHandle>)> BlobCallback;
jam 2014/05/14 17:14:00 nit: convention in content api is to put the callb
tommycli 2014/05/14 18:07:05 Done.
+
static DownloadManager* GetDownloadManager(BrowserContext* browser_context);
// Returns BrowserContext specific external mount points. It may return NULL
@@ -77,6 +80,11 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
static content::StoragePartition* GetDefaultStoragePartition(
BrowserContext* browser_context);
+ // |callback| returns a NULL scoped_ptr on failure.
+ static void CreateMemoryBackedBlob(BrowserContext* browser_context,
+ const char* data, size_t length,
+ const BlobCallback& callback);
+
// Ensures that the corresponding ResourceContext is initialized. Normally the
// BrowserContext initializs the corresponding getters when its objects are
// created, but if the embedder wants to pass the ResourceContext to another
« no previous file with comments | « content/public/browser/blob_handle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698