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/application_manager/application_manager.h" | 5 #include "mojo/application_manager/application_manager.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace { | 23 namespace { |
24 // Used by TestAPI. | 24 // Used by TestAPI. |
25 bool has_created_instance = false; | 25 bool has_created_instance = false; |
26 | 26 |
27 class StubServiceProvider : public InterfaceImpl<ServiceProvider> { | 27 class StubServiceProvider : public InterfaceImpl<ServiceProvider> { |
28 public: | 28 public: |
29 ServiceProvider* GetRemoteServiceProvider() { return client(); } | 29 ServiceProvider* GetRemoteServiceProvider() { return client(); } |
30 | 30 |
31 private: | 31 private: |
32 virtual void ConnectToService(const String& service_name, | 32 virtual void ConnectToService( |
33 ScopedMessagePipeHandle client_handle) | 33 const String& service_name, |
34 MOJO_OVERRIDE {} | 34 ScopedMessagePipeHandle client_handle) override {} |
35 }; | 35 }; |
36 | 36 |
37 } // namespace | 37 } // namespace |
38 | 38 |
39 ApplicationManager::Delegate::~Delegate() {} | 39 ApplicationManager::Delegate::~Delegate() {} |
40 | 40 |
41 class ApplicationManager::LoadCallbacksImpl | 41 class ApplicationManager::LoadCallbacksImpl |
42 : public ApplicationLoader::LoadCallbacks { | 42 : public ApplicationLoader::LoadCallbacks { |
43 public: | 43 public: |
44 LoadCallbacksImpl(base::WeakPtr<ApplicationManager> manager, | 44 LoadCallbacksImpl(base::WeakPtr<ApplicationManager> manager, |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 StubServiceProvider* stub_sp = new StubServiceProvider; | 319 StubServiceProvider* stub_sp = new StubServiceProvider; |
320 ServiceProviderPtr spp; | 320 ServiceProviderPtr spp; |
321 BindToProxy(stub_sp, &spp); | 321 BindToProxy(stub_sp, &spp); |
322 ConnectToApplication(application_url, GURL(), spp.Pass()); | 322 ConnectToApplication(application_url, GURL(), spp.Pass()); |
323 MessagePipe pipe; | 323 MessagePipe pipe; |
324 stub_sp->GetRemoteServiceProvider()->ConnectToService(interface_name, | 324 stub_sp->GetRemoteServiceProvider()->ConnectToService(interface_name, |
325 pipe.handle1.Pass()); | 325 pipe.handle1.Pass()); |
326 return pipe.handle0.Pass(); | 326 return pipe.handle0.Pass(); |
327 } | 327 } |
328 } // namespace mojo | 328 } // namespace mojo |
OLD | NEW |