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) override; |
35 void DeliverBlob(const mojo::String& id) override; | 37 void DeliverBlob(const mojo::String& id) override; |
36 | 38 |
37 // Binds |this| and its object lifetime to a Mojo connection. | 39 // Binds |this| and its object lifetime to a Mojo connection. |
38 mojo::StrongBinding<mojom::BlobChannel> binding_; | 40 mojo::StrongBinding<mojom::BlobChannel> binding_; |
39 | 41 |
40 // Sender object which will receive the blobs passed over the Mojo service. | 42 // Sender object which will receive the blobs passed over the Mojo service. |
41 BlobChannelSender* blob_channel_sender_; | 43 BlobChannelSender* blob_channel_sender_; |
42 | 44 |
43 DISALLOW_COPY_AND_ASSIGN(BlobChannelService); | 45 DISALLOW_COPY_AND_ASSIGN(BlobChannelService); |
44 }; | 46 }; |
45 | 47 |
46 } // namespace engine | 48 } // namespace engine |
47 } // namespace blimp | 49 } // namespace blimp |
48 | 50 |
49 #endif // BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ | 51 #endif // BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_ |
OLD | NEW |