OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/shell_impl.h" | 5 #include "shell/application_manager/shell_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "mojo/converters/url/url_type_converters.h" | 9 #include "mojo/converters/url/url_type_converters.h" |
10 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" | 10 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 ShellImpl::~ShellImpl() { | 62 ShellImpl::~ShellImpl() { |
63 } | 63 } |
64 | 64 |
65 void ShellImpl::InitializeApplication(Array<String> args) { | 65 void ShellImpl::InitializeApplication(Array<String> args) { |
66 ShellPtr shell; | 66 ShellPtr shell; |
67 binding_.Bind(GetProxy(&shell)); | 67 binding_.Bind(GetProxy(&shell)); |
68 application_->Initialize(std::move(shell), std::move(args), | 68 application_->Initialize(std::move(shell), std::move(args), |
69 identity_.url.spec()); | 69 identity_.url.spec()); |
70 } | 70 } |
71 | 71 |
72 void ShellImpl::ConnectToClient( | 72 void ShellImpl::ConnectToClient(const GURL& requested_url, |
73 const GURL& requested_url, | 73 const GURL& requestor_url, |
74 const GURL& requestor_url, | 74 InterfaceRequest<ServiceProvider> services) { |
75 InterfaceRequest<ServiceProvider> services, | 75 application_->AcceptConnection(String::From(requestor_url), |
76 InterfaceHandle<ServiceProvider> exposed_services) { | 76 std::move(services), nullptr, |
77 application_->AcceptConnection( | 77 requested_url.spec()); |
78 String::From(requestor_url), std::move(services), | |
79 std::move(exposed_services), requested_url.spec()); | |
80 } | 78 } |
81 | 79 |
82 void ShellImpl::ConnectToApplication( | 80 void ShellImpl::ConnectToApplication( |
83 const String& app_url, | 81 const String& app_url, |
84 InterfaceRequest<ServiceProvider> services, | 82 InterfaceRequest<ServiceProvider> services, |
85 InterfaceHandle<mojo::ServiceProvider> exposed_services) { | 83 InterfaceHandle<mojo::ServiceProvider> exposed_services) { |
86 GURL app_gurl(app_url); | 84 GURL app_gurl(app_url); |
87 if (!app_gurl.is_valid()) { | 85 if (!app_gurl.is_valid()) { |
88 LOG(ERROR) << "Error: invalid URL: " << app_url; | 86 LOG(ERROR) << "Error: invalid URL: " << app_url; |
89 return; | 87 return; |
90 } | 88 } |
| 89 LOG_IF(ERROR, exposed_services) << "exposed_services no longer supported!"; |
91 manager_->ConnectToApplication(app_gurl, identity_.url, std::move(services), | 90 manager_->ConnectToApplication(app_gurl, identity_.url, std::move(services), |
92 std::move(exposed_services), base::Closure()); | 91 base::Closure()); |
93 } | 92 } |
94 | 93 |
95 void ShellImpl::CreateApplicationConnector( | 94 void ShellImpl::CreateApplicationConnector( |
96 InterfaceRequest<ApplicationConnector> application_connector_request) { | 95 InterfaceRequest<ApplicationConnector> application_connector_request) { |
97 application_connector_impl_.Duplicate( | 96 application_connector_impl_.Duplicate( |
98 std::move(application_connector_request)); | 97 std::move(application_connector_request)); |
99 } | 98 } |
100 | 99 |
101 } // namespace shell | 100 } // namespace shell |
OLD | NEW |