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 "chrome/browser/media/cast_remoting_connector.h" | 5 #include "chrome/browser/media/cast_remoting_connector.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 void TearDown() final { | 251 void TearDown() final { |
252 // Allow any pending Mojo operations to complete before destruction. For | 252 // Allow any pending Mojo operations to complete before destruction. For |
253 // example, when one end of a Mojo message pipe is closed, a task is posted | 253 // example, when one end of a Mojo message pipe is closed, a task is posted |
254 // to later destroy objects that were owned by the message pipe. | 254 // to later destroy objects that were owned by the message pipe. |
255 RunUntilIdle(); | 255 RunUntilIdle(); |
256 } | 256 } |
257 | 257 |
258 protected: | 258 protected: |
259 RemoterPtr CreateRemoter(MockRemotingSource* source) { | 259 RemoterPtr CreateRemoter(MockRemotingSource* source) { |
260 RemotingSourcePtr source_ptr; | 260 RemotingSourcePtr source_ptr; |
261 source->Bind(mojo::GetProxy(&source_ptr)); | 261 source->Bind(mojo::MakeRequest(&source_ptr)); |
262 RemoterPtr remoter_ptr; | 262 RemoterPtr remoter_ptr; |
263 connector_.CreateBridge(std::move(source_ptr), | 263 connector_.CreateBridge(std::move(source_ptr), |
264 mojo::GetProxy(&remoter_ptr)); | 264 mojo::MakeRequest(&remoter_ptr)); |
265 return remoter_ptr; | 265 return remoter_ptr; |
266 } | 266 } |
267 | 267 |
268 void ProviderDiscoversSink() { | 268 void ProviderDiscoversSink() { |
269 media_router_.OnRemotingRouteExists(true); | 269 media_router_.OnRemotingRouteExists(true); |
270 } | 270 } |
271 | 271 |
272 void ProviderLosesSink() { | 272 void ProviderLosesSink() { |
273 media_router_.OnRemotingRouteExists(false); | 273 media_router_.OnRemotingRouteExists(false); |
274 } | 274 } |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 break; | 610 break; |
611 } | 611 } |
612 } | 612 } |
613 } | 613 } |
614 | 614 |
615 INSTANTIATE_TEST_CASE_P(, CastRemotingConnectorFullSessionTest, | 615 INSTANTIATE_TEST_CASE_P(, CastRemotingConnectorFullSessionTest, |
616 ::testing::Values(SOURCE_TERMINATES, | 616 ::testing::Values(SOURCE_TERMINATES, |
617 MOJO_PIPE_CLOSES, | 617 MOJO_PIPE_CLOSES, |
618 ROUTE_TERMINATES, | 618 ROUTE_TERMINATES, |
619 EXTERNAL_FAILURE)); | 619 EXTERNAL_FAILURE)); |
OLD | NEW |