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 e0d768272bc1db3b7582599ecd142c16732db7e7..17e16fcba4821465360d60900c925cd3b75ab938 100644 |
--- a/blimp/engine/mojo/blob_channel_service.h |
+++ b/blimp/engine/mojo/blob_channel_service.h |
@@ -9,6 +9,9 @@ |
#include "mojo/public/cpp/bindings/strong_binding.h" |
namespace blimp { |
+ |
+class BlobChannelSender; |
+ |
namespace engine { |
// Service for processing BlobChannel requests from the renderer. |
@@ -16,20 +19,25 @@ namespace engine { |
class BlobChannelService : public mojom::BlobChannel { |
public: |
// Creates a BlobChannel bound to the connection specified by |request|. |
- explicit BlobChannelService(mojom::BlobChannelRequest request); |
+ // |blob_channel| must outlive the Mojo connection. |
+ explicit BlobChannelService(BlobChannelSender* blob_channel, |
Wez
2016/05/21 01:08:04
nit: Drop "explicit" here.
Kevin M
2016/05/27 22:35:30
Done.
|
+ mojom::BlobChannelRequest request); |
~BlobChannelService() override; |
// Factory method called by Mojo. |
Wez
2016/05/21 01:08:04
Why do we need both the factory method and the con
Kevin M
2016/05/27 22:35:30
Good question! Done.
|
- static void Create(mojo::InterfaceRequest<mojom::BlobChannel> request); |
+ static void Create(BlobChannelSender* blob_channel, |
+ mojo::InterfaceRequest<mojom::BlobChannel> request); |
private: |
// BlobChannel implementation. |
- void Put(const mojo::String& id, mojo::Array<uint8_t> data) override; |
+ void Put(const mojo::String& id, const mojo::String& data) override; |
void Push(const mojo::String& id) override; |
// Binds |this| and its object lifetime to a Mojo connection. |
mojo::StrongBinding<mojom::BlobChannel> binding_; |
+ BlobChannelSender* blob_channel_; |
Wez
2016/05/21 01:08:04
nit: Add one-line comment to explain what this is
Kevin M
2016/05/27 22:35:30
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(BlobChannelService); |
}; |