| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "shell/application_manager/application_manager.h" | 5 #include "shell/application_manager/application_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 service_provider_impl->AddService<TestB>( | 316 service_provider_impl->AddService<TestB>( |
| 317 [this](const ConnectionContext& connection_context, | 317 [this](const ConnectionContext& connection_context, |
| 318 InterfaceRequest<TestB> test_b_request) { | 318 InterfaceRequest<TestB> test_b_request) { |
| 319 new TestBImpl(context_, test_b_request.Pass()); | 319 new TestBImpl(context_, test_b_request.Pass()); |
| 320 }); | 320 }); |
| 321 } else { | 321 } else { |
| 322 service_provider_impl->AddService<TestA>( | 322 service_provider_impl->AddService<TestA>( |
| 323 [this](const ConnectionContext& connection_context, | 323 [this](const ConnectionContext& connection_context, |
| 324 InterfaceRequest<TestA> test_a_request) { | 324 InterfaceRequest<TestA> test_a_request) { |
| 325 mojo::InterfaceHandle<mojo::ServiceProvider> incoming_sp_handle; | 325 mojo::InterfaceHandle<mojo::ServiceProvider> incoming_sp_handle; |
| 326 shell()->ConnectToApplication( | 326 shell()->ConnectToApplication(kTestBURLString, |
| 327 kTestBURLString, GetProxy(&incoming_sp_handle), nullptr); | 327 GetProxy(&incoming_sp_handle)); |
| 328 a_bindings_.push_back(new TestAImpl( | 328 a_bindings_.push_back(new TestAImpl( |
| 329 incoming_sp_handle.Pass(), context_, test_a_request.Pass())); | 329 incoming_sp_handle.Pass(), context_, test_a_request.Pass())); |
| 330 }); | 330 }); |
| 331 } | 331 } |
| 332 return true; | 332 return true; |
| 333 } | 333 } |
| 334 | 334 |
| 335 TesterContext* context_; | 335 TesterContext* context_; |
| 336 std::string requestor_url_; | 336 std::string requestor_url_; |
| 337 ScopedVector<TestAImpl> a_bindings_; | 337 ScopedVector<TestAImpl> a_bindings_; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 bool called = false; | 771 bool called = false; |
| 772 application_manager_->ConnectToApplication( | 772 application_manager_->ConnectToApplication( |
| 773 GURL("test:test"), GURL(), nullptr, | 773 GURL("test:test"), GURL(), nullptr, |
| 774 base::Bind(&QuitClosure, base::Unretained(&called))); | 774 base::Bind(&QuitClosure, base::Unretained(&called))); |
| 775 loop_.Run(); | 775 loop_.Run(); |
| 776 EXPECT_TRUE(called); | 776 EXPECT_TRUE(called); |
| 777 } | 777 } |
| 778 | 778 |
| 779 } // namespace | 779 } // namespace |
| 780 } // namespace shell | 780 } // namespace shell |
| OLD | NEW |