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

Unified Diff: blimp/engine/mojo/blob_channel_mojo_impl.h

Issue 1859753002: Blimp: create Mojo component for renderer/browser communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: blimp/engine/mojo/blob_channel_mojo_impl.h
diff --git a/blimp/engine/mojo/blob_channel_mojo_impl.h b/blimp/engine/mojo/blob_channel_mojo_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6ecc8301179eb6c98d725adae2fe8c669d2e89d
--- /dev/null
+++ b/blimp/engine/mojo/blob_channel_mojo_impl.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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 BLIMP_ENGINE_MOJO_BLOB_CHANNEL_MOJO_IMPL_H_
+#define BLIMP_ENGINE_MOJO_BLOB_CHANNEL_MOJO_IMPL_H_
+
+#include "blimp/engine/mojo/blob_channel.mojom.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace blimp {
+namespace engine {
+
+class BlobChannelMojoImpl : public BlobChannelMojo {
nyquist 2016/04/05 22:13:19 Could you make it clear from the documentation whe
Kevin M 2016/04/06 00:01:44 Done.
+ public:
+ // Creates a BlobChannel bound to the connection specified by |request|.
+ explicit BlobChannelMojoImpl(mojo::InterfaceRequest<BlobChannelMojo> request);
+ ~BlobChannelMojoImpl() override;
+
+ // Factory method called by Mojo.
+ static void Create(mojo::InterfaceRequest<BlobChannelMojo> request);
+
+ private:
+ // BlobChannel implementation.
+ void Put(const mojo::String& id, mojo::Array<uint8_t> data) override;
+ void Push(const mojo::String& id) override;
+
+ // Binds |this| and its object lifetime to a Mojo connection.
+ mojo::StrongBinding<BlobChannelMojo> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlobChannelMojoImpl);
+};
+
+} // namespace engine
+} // namespace blimp
+
+#endif // BLIMP_ENGINE_MOJO_BLOB_CHANNEL_MOJO_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698