| 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 "base/at_exit.h" | 5 #include "base/at_exit.h" | 
| 6 #include "base/bind.h" | 6 #include "base/bind.h" | 
| 7 #include "base/macros.h" | 7 #include "base/macros.h" | 
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" | 
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" | 
| 10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" | 
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 353     if (connection->GetRemoteApplicationURL() == kTestAURLString) | 353     if (connection->GetRemoteApplicationURL() == kTestAURLString) | 
| 354       connection->AddService<TestB>(this); | 354       connection->AddService<TestB>(this); | 
| 355     else | 355     else | 
| 356       connection->AddService<TestA>(this); | 356       connection->AddService<TestA>(this); | 
| 357     return true; | 357     return true; | 
| 358   } | 358   } | 
| 359 | 359 | 
| 360   void Create(ApplicationConnection* connection, | 360   void Create(ApplicationConnection* connection, | 
| 361               InterfaceRequest<TestA> request) override { | 361               InterfaceRequest<TestA> request) override { | 
| 362     ApplicationConnection* b_connection = | 362     ApplicationConnection* b_connection = | 
| 363         app_->ConnectToApplication(kTestBURLString); | 363         app_->ConnectToApplicationDeprecated(kTestBURLString); | 
| 364     b_connection->AddService<TestC>(this); | 364     b_connection->AddService<TestC>(this); | 
| 365     a_bindings_.push_back( | 365     a_bindings_.push_back( | 
| 366         new TestAImpl(b_connection, context_, request.Pass())); | 366         new TestAImpl(b_connection, context_, request.Pass())); | 
| 367   } | 367   } | 
| 368 | 368 | 
| 369   void Create(ApplicationConnection* connection, | 369   void Create(ApplicationConnection* connection, | 
| 370               InterfaceRequest<TestB> request) override { | 370               InterfaceRequest<TestB> request) override { | 
| 371     new TestBImpl(connection, context_, request.Pass()); | 371     new TestBImpl(connection, context_, request.Pass()); | 
| 372   } | 372   } | 
| 373 | 373 | 
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 840   bool called = false; | 840   bool called = false; | 
| 841   application_manager_->ConnectToApplication( | 841   application_manager_->ConnectToApplication( | 
| 842       GURL("test:test"), GURL(), nullptr, nullptr, | 842       GURL("test:test"), GURL(), nullptr, nullptr, | 
| 843       base::Bind(&QuitClosure, base::Unretained(&called))); | 843       base::Bind(&QuitClosure, base::Unretained(&called))); | 
| 844   loop_.Run(); | 844   loop_.Run(); | 
| 845   EXPECT_TRUE(called); | 845   EXPECT_TRUE(called); | 
| 846 } | 846 } | 
| 847 | 847 | 
| 848 }  // namespace | 848 }  // namespace | 
| 849 }  // namespace shell | 849 }  // namespace shell | 
| OLD | NEW | 
|---|