OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "mojo/service_manager/service_manager.h" | 7 #include "mojo/service_manager/service_manager.h" |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "mojo/common/common_type_converters.h" | 13 #include "mojo/common/common_type_converters.h" |
| 14 #include "mojo/public/interfaces/application/application.mojom.h" |
| 15 #include "mojo/public/interfaces/application/shell.mojom.h" |
14 #include "mojo/service_manager/service_loader.h" | 16 #include "mojo/service_manager/service_loader.h" |
15 | 17 |
16 namespace mojo { | 18 namespace mojo { |
17 | 19 |
18 namespace { | 20 namespace { |
19 // Used by TestAPI. | 21 // Used by TestAPI. |
20 bool has_created_instance = false; | 22 bool has_created_instance = false; |
21 | 23 |
22 class StubServiceProvider : public InterfaceImpl<ServiceProvider> { | 24 class StubServiceProvider : public InterfaceImpl<ServiceProvider> { |
23 public: | 25 public: |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 StubServiceProvider* stub_sp = new StubServiceProvider; | 184 StubServiceProvider* stub_sp = new StubServiceProvider; |
183 ServiceProviderPtr spp; | 185 ServiceProviderPtr spp; |
184 BindToProxy(stub_sp, &spp); | 186 BindToProxy(stub_sp, &spp); |
185 ConnectToApplication(application_url, GURL(), spp.Pass()); | 187 ConnectToApplication(application_url, GURL(), spp.Pass()); |
186 MessagePipe pipe; | 188 MessagePipe pipe; |
187 stub_sp->GetRemoteServiceProvider()->ConnectToService( | 189 stub_sp->GetRemoteServiceProvider()->ConnectToService( |
188 interface_name, pipe.handle1.Pass()); | 190 interface_name, pipe.handle1.Pass()); |
189 return pipe.handle0.Pass(); | 191 return pipe.handle0.Pass(); |
190 } | 192 } |
191 } // namespace mojo | 193 } // namespace mojo |
OLD | NEW |