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 #include "blimp/engine/renderer/blob_channel_sender_proxy.h" | 5 #include "blimp/engine/renderer/blob_channel_sender_proxy.h" |
6 | 6 |
7 #include "content/public/common/service_registry.h" | |
8 #include "content/public/renderer/render_thread.h" | 7 #include "content/public/renderer/render_thread.h" |
| 8 #include "services/shell/public/cpp/interface_provider.h" |
9 | 9 |
10 namespace blimp { | 10 namespace blimp { |
11 namespace engine { | 11 namespace engine { |
12 namespace { | 12 namespace { |
13 | 13 |
14 mojom::BlobChannelPtr GetConnectedBlobChannel() { | 14 mojom::BlobChannelPtr GetConnectedBlobChannel() { |
15 mojom::BlobChannelPtr blob_channel_ptr; | 15 mojom::BlobChannelPtr blob_channel_ptr; |
16 content::RenderThread::Get()->GetServiceRegistry()->ConnectToRemoteService( | 16 content::RenderThread::Get()->GetRemoteInterfaces()->GetInterface( |
17 mojo::GetProxy(&blob_channel_ptr)); | 17 &blob_channel_ptr); |
18 CHECK(blob_channel_ptr) << "Could not connect to BlobChannel Mojo service."; | 18 CHECK(blob_channel_ptr) << "Could not connect to BlobChannel Mojo interface."; |
19 return blob_channel_ptr; | 19 return blob_channel_ptr; |
20 } | 20 } |
21 | 21 |
22 } // namespace | 22 } // namespace |
23 | 23 |
24 BlobChannelSenderProxy::BlobChannelSenderProxy() | 24 BlobChannelSenderProxy::BlobChannelSenderProxy() |
25 : blob_channel_(GetConnectedBlobChannel()) {} | 25 : blob_channel_(GetConnectedBlobChannel()) {} |
26 | 26 |
27 BlobChannelSenderProxy::~BlobChannelSenderProxy() {} | 27 BlobChannelSenderProxy::~BlobChannelSenderProxy() {} |
28 | 28 |
(...skipping 18 matching lines...) Expand all Loading... |
47 // We assume that the client will have the blob if we push it. | 47 // We assume that the client will have the blob if we push it. |
48 // TODO(kmarshall): Revisit this assumption when asynchronous blob transport | 48 // TODO(kmarshall): Revisit this assumption when asynchronous blob transport |
49 // is supported. | 49 // is supported. |
50 replication_state_[id] = true; | 50 replication_state_[id] = true; |
51 | 51 |
52 blob_channel_->DeliverBlob(id); | 52 blob_channel_->DeliverBlob(id); |
53 } | 53 } |
54 | 54 |
55 } // namespace engine | 55 } // namespace engine |
56 } // namespace blimp | 56 } // namespace blimp |
OLD | NEW |