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 "mojo/public/cpp/application/application_impl.h" | 5 #include "mojo/public/cpp/application/application_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "mojo/public/cpp/application/application_delegate.h" | 9 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/lib/service_registry.h" | 10 #include "mojo/public/cpp/application/lib/service_registry.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 InterfaceHandle<ApplicationConnector> | 28 InterfaceHandle<ApplicationConnector> |
29 ApplicationImpl::CreateApplicationConnector() { | 29 ApplicationImpl::CreateApplicationConnector() { |
30 MOJO_CHECK(shell_); | 30 MOJO_CHECK(shell_); |
31 InterfaceHandle<ApplicationConnector> application_connector; | 31 InterfaceHandle<ApplicationConnector> application_connector; |
32 shell_->CreateApplicationConnector(GetProxy(&application_connector)); | 32 shell_->CreateApplicationConnector(GetProxy(&application_connector)); |
33 return application_connector; | 33 return application_connector; |
34 } | 34 } |
35 | 35 |
36 ApplicationConnection* ApplicationImpl::ConnectToApplication( | 36 ApplicationConnection* ApplicationImpl::ConnectToApplicationDeprecated( |
37 const String& application_url) { | 37 const String& application_url) { |
38 MOJO_CHECK(shell_); | 38 MOJO_CHECK(shell_); |
39 InterfaceHandle<ServiceProvider> local_services; | 39 InterfaceHandle<ServiceProvider> local_services; |
40 InterfaceRequest<ServiceProvider> local_request = GetProxy(&local_services); | 40 InterfaceRequest<ServiceProvider> local_request = GetProxy(&local_services); |
41 ServiceProviderPtr remote_services; | 41 ServiceProviderPtr remote_services; |
42 shell_->ConnectToApplication(application_url, GetProxy(&remote_services), | 42 shell_->ConnectToApplication(application_url, GetProxy(&remote_services), |
43 std::move(local_services)); | 43 std::move(local_services)); |
44 internal::ServiceRegistry* registry = new internal::ServiceRegistry( | 44 internal::ServiceRegistry* registry = new internal::ServiceRegistry( |
45 this, application_url, application_url, remote_services.Pass(), | 45 this, application_url, application_url, remote_services.Pass(), |
46 local_request.Pass()); | 46 local_request.Pass()); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return; | 88 return; |
89 incoming_service_registries_.push_back(std::move(registry)); | 89 incoming_service_registries_.push_back(std::move(registry)); |
90 } | 90 } |
91 | 91 |
92 void ApplicationImpl::RequestQuit() { | 92 void ApplicationImpl::RequestQuit() { |
93 delegate_->Quit(); | 93 delegate_->Quit(); |
94 Terminate(); | 94 Terminate(); |
95 } | 95 } |
96 | 96 |
97 } // namespace mojo | 97 } // namespace mojo |
OLD | NEW |