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..84e9623ab02af99f445f745b4fcf5b7edaf5ca87 100644 |
--- a/blimp/engine/mojo/blob_channel_service.h |
+++ b/blimp/engine/mojo/blob_channel_service.h |
@@ -9,27 +9,37 @@ |
#include "mojo/public/cpp/bindings/strong_binding.h" |
namespace blimp { |
+ |
+class BlobChannelSender; |
+ |
namespace engine { |
// Service for processing BlobChannel requests from the renderer. |
// Runs on the browser process. |
class BlobChannelService : public mojom::BlobChannel { |
public: |
- // Creates a BlobChannel bound to the connection specified by |request|. |
- explicit BlobChannelService(mojom::BlobChannelRequest request); |
~BlobChannelService() override; |
// Factory method called by Mojo. |
- static void Create(mojo::InterfaceRequest<mojom::BlobChannel> request); |
+ static void Create(BlobChannelSender* blob_channel_sender, |
+ 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 Put(const mojo::String& id, mojo::Array<uint8_t> data) override; |
- void Push(const mojo::String& id) override; |
+ void PutBlob(const mojo::String& id, const mojo::String& data) override; |
+ void DeliverBlob(const mojo::String& id) override; |
// Binds |this| and its object lifetime to a Mojo connection. |
mojo::StrongBinding<mojom::BlobChannel> binding_; |
+ // Sender object which will receive the blobs passed over the Mojo service. |
+ BlobChannelSender* blob_channel_sender_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BlobChannelService); |
}; |