OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ | 5 #ifndef BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ |
6 #define BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ | 6 #define BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ |
7 | 7 |
8 #include "blimp/engine/mojo/blob_channel.mojom.h" | 8 #include "blimp/engine/mojo/blob_channel.mojom.h" |
9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 static void Create(BlobChannelSender* blob_channel_sender, | 24 static void Create(BlobChannelSender* blob_channel_sender, |
25 mojo::InterfaceRequest<mojom::BlobChannel> request); | 25 mojo::InterfaceRequest<mojom::BlobChannel> request); |
26 | 26 |
27 private: | 27 private: |
28 // Creates a BlobChannel bound to the connection specified by |request|. | 28 // Creates a BlobChannel bound to the connection specified by |request|. |
29 // |blob_channel_sender| must outlive the Mojo connection. | 29 // |blob_channel_sender| must outlive the Mojo connection. |
30 BlobChannelService(BlobChannelSender* blob_channel_sender, | 30 BlobChannelService(BlobChannelSender* blob_channel_sender, |
31 mojom::BlobChannelRequest request); | 31 mojom::BlobChannelRequest request); |
32 | 32 |
33 // BlobChannel implementation. | 33 // BlobChannel implementation. |
34 void PutBlob(const mojo::String& id, const mojo::String& data) override; | 34 void PutBlob(const mojo::String& id, |
| 35 mojo::ScopedSharedBufferHandle data, |
| 36 uint32_t size, |
| 37 const PutBlobCallback& callback) override; |
35 void DeliverBlob(const mojo::String& id) override; | 38 void DeliverBlob(const mojo::String& id) override; |
36 | 39 |
37 // Binds |this| and its object lifetime to a Mojo connection. | 40 // Binds |this| and its object lifetime to a Mojo connection. |
38 mojo::StrongBinding<mojom::BlobChannel> binding_; | 41 mojo::StrongBinding<mojom::BlobChannel> binding_; |
39 | 42 |
40 // Sender object which will receive the blobs passed over the Mojo service. | 43 // Sender object which will receive the blobs passed over the Mojo service. |
41 BlobChannelSender* blob_channel_sender_; | 44 BlobChannelSender* blob_channel_sender_; |
42 | 45 |
43 DISALLOW_COPY_AND_ASSIGN(BlobChannelService); | 46 DISALLOW_COPY_AND_ASSIGN(BlobChannelService); |
44 }; | 47 }; |
45 | 48 |
46 } // namespace engine | 49 } // namespace engine |
47 } // namespace blimp | 50 } // namespace blimp |
48 | 51 |
49 #endif // BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ | 52 #endif // BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ |
OLD | NEW |