Chromium Code Reviews| Index: blimp/engine/mojo/blob_channel_service.h |
| diff --git a/blimp/engine/mojo/blob_channel_service.h b/blimp/engine/mojo/blob_channel_service.h |
| index 83e06d9368f3da8d0e7d289732c81a28603a21fd..1008ab9c0112afc24ce41eed37d4aa78fb3b1b54 100644 |
| --- a/blimp/engine/mojo/blob_channel_service.h |
| +++ b/blimp/engine/mojo/blob_channel_service.h |
| @@ -8,7 +8,7 @@ |
| #include <string> |
| #include "blimp/engine/mojo/blob_channel.mojom.h" |
| -#include "mojo/public/cpp/bindings/strong_binding.h" |
| +#include "mojo/public/cpp/bindings/binding_set.h" |
| namespace blimp { |
| @@ -20,18 +20,16 @@ namespace engine { |
| // Runs on the browser process. |
| class BlobChannelService : public mojom::BlobChannel { |
| public: |
| + // |blob_channel_sender| must outlive the Mojo connection. |
| + explicit BlobChannelService(BlobChannelSender* blob_channel_sender); |
| + |
| ~BlobChannelService() override; |
| // Factory method called by Mojo. |
| - static void Create(BlobChannelSender* blob_channel_sender, |
| - mojo::InterfaceRequest<mojom::BlobChannel> request); |
| + // Binds |this| to the connection specified by |request|. |
| + void BindRequest(mojo::InterfaceRequest<mojom::BlobChannel> request); |
| private: |
| - // Creates a BlobChannel bound to the connection specified by |request|. |
| - // |blob_channel_sender| must outlive the Mojo connection. |
| - BlobChannelService(BlobChannelSender* blob_channel_sender, |
| - mojom::BlobChannelRequest request); |
| - |
| // BlobChannel implementation. |
| void GetCachedBlobIds( |
| const GetCachedBlobIdsCallback& response_callback) override; |
| @@ -40,8 +38,8 @@ class BlobChannelService : public mojom::BlobChannel { |
| uint32_t size) override; |
| void DeliverBlob(const std::string& id) override; |
| - // Binds |this| and its object lifetime to a Mojo connection. |
| - mojo::StrongBinding<mojom::BlobChannel> binding_; |
| + // Binds |this| and its object lifetime to a set of Mojo connections. |
|
Kevin M
2016/07/28 20:59:17
The lifetime is not bound to BindingSet at all?
CJ
2016/07/28 22:47:05
Done.
|
| + mojo::BindingSet<mojom::BlobChannel> bindings_; |
| // Sender object which will receive the blobs passed over the Mojo service. |
| BlobChannelSender* blob_channel_sender_; |