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

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

Issue 250143002: Media Galleries API: Audio/Video attached pictures support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make blob_storage_host a content/public interface with a content-private impl Created 6 years, 8 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/public/browser/fileapi/blob_storage_host.h
diff --git a/content/public/browser/fileapi/blob_storage_host.h b/content/public/browser/fileapi/blob_storage_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..7c8e4cf0c3577435ff90b10522360f61ce759263
--- /dev/null
+++ b/content/public/browser/fileapi/blob_storage_host.h
@@ -0,0 +1,52 @@
+// 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_STORAGE_HOST_H_
+#define CONTENT_PUBLIC_BROWSER_FILEAPI_BLOB_STORAGE_HOST_H_
+
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "content/common/content_export.h"
+#include "webkit/common/blob/blob_data.h"
+
+class GURL;
+
+namespace webkit_blob {
+class BlobStorageContext;
+}
+
+using webkit_blob::BlobStorageContext;
+using webkit_blob::BlobData;
+
+namespace content {
+
+// This class handles the logistics of blob storage for a single child process.
+// There is one instance per child process. When the child process
+// terminates all blob references attibutable to that process go away upon
+// destruction of the instance. The class is single threaded and should
+// only be used on the IO thread.
+class CONTENT_EXPORT BlobStorageHost {
+ public:
+ virtual ~BlobStorageHost();
+
+ // Methods to support the IPC message protocol.
+ // A false return indicates a problem with the inputs
+ // like a non-existent or pre-existent uuid or url.
+ virtual bool StartBuildingBlob(const std::string& uuid) = 0;
+ virtual bool AppendBlobDataItem(const std::string& uuid,
+ const BlobData::Item& data_item) = 0;
+ virtual bool CancelBuildingBlob(const std::string& uuid) = 0;
+ virtual bool FinishBuildingBlob(const std::string& uuid,
+ const std::string& type) = 0;
+ virtual bool IncrementBlobRefCount(const std::string& uuid) = 0;
+ virtual bool DecrementBlobRefCount(const std::string& uuid) = 0;
+ virtual bool RegisterPublicBlobURL(const GURL& blob_url,
+ const std::string& uuid) = 0;
+ virtual bool RevokePublicBlobURL(const GURL& blob_url) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_FILEAPI_BLOB_STORAGE_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698