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

Unified Diff: storage/browser/blob/blob_impl.h

Issue 2892953006: WIP POC blob transport over mojo
Patch Set: pass mojo blobs over ipc Created 3 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 | « storage/browser/BUILD.gn ('k') | storage/browser/blob/blob_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_impl.h
diff --git a/storage/browser/blob/blob_impl.h b/storage/browser/blob/blob_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..cb180ca4fed2d541e6909c387d222e3d3394033a
--- /dev/null
+++ b/storage/browser/blob/blob_impl.h
@@ -0,0 +1,34 @@
+// Copyright 2017 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 STORAGE_BROWSER_BLOB_BLOB_IMPL_H_
+#define STORAGE_BROWSER_BLOB_BLOB_IMPL_H_
+
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "third_party/WebKit/public/platform/blobs.mojom.h"
+
+namespace storage {
+
+class BlobDataHandle;
+
+// Self destroys when no more bindings exist.
+class BlobImpl : public mojom::Blob {
+ public:
+ BlobImpl(std::unique_ptr<BlobDataHandle> handle, mojom::BlobRequest request);
+
+ void Clone(mojom::BlobRequest request) override;
+ void InternalGetUUID(InternalGetUUIDCallback callback) override;
+
+ private:
+ ~BlobImpl() override;
+ void OnConnectionError();
+
+ std::unique_ptr<BlobDataHandle> handle_;
+
+ mojo::BindingSet<mojom::Blob> bindings_;
+};
+
+} // namespace storage
+
+#endif // STORAGE_BROWSER_BLOB_BLOB_IMPL_H_
« no previous file with comments | « storage/browser/BUILD.gn ('k') | storage/browser/blob/blob_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698