Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: mojo/shell/dynamic_service_loader.h

Issue 164313002: Rename ServiceConnector back to ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bad upload Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/run.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_ 5 #ifndef MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_
6 #define MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_ 6 #define MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "mojo/public/system/core_cpp.h" 11 #include "mojo/public/system/core_cpp.h"
12 #include "mojo/shell/keep_alive.h" 12 #include "mojo/shell/keep_alive.h"
13 #include "mojo/shell/service_connector.h" 13 #include "mojo/shell/service_manager.h"
14 #include "mojom/shell.h" 14 #include "mojom/shell.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace shell { 18 namespace shell {
19 19
20 class Context; 20 class Context;
21 21
22 // A subclass of ServiceManager::Loader that loads a dynamic library containing 22 // A subclass of ServiceManager::Loader that loads a dynamic library containing
23 // the implementation of the service. 23 // the implementation of the service.
24 class DynamicServiceLoader : public ServiceConnector::Loader { 24 class DynamicServiceLoader : public ServiceManager::Loader {
25 public: 25 public:
26 explicit DynamicServiceLoader(Context* context); 26 explicit DynamicServiceLoader(Context* context);
27 virtual ~DynamicServiceLoader(); 27 virtual ~DynamicServiceLoader();
28 28
29 // Initiates the dynamic load. If the url is a mojo: scheme then the name 29 // Initiates the dynamic load. If the url is a mojo: scheme then the name
30 // specified will be modified to the platform's naming scheme. Also the 30 // specified will be modified to the platform's naming scheme. Also the
31 // value specified to the --origin command line argument will be used as the 31 // value specified to the --origin command line argument will be used as the
32 // host / port. 32 // host / port.
33 virtual void Load(const GURL& url, 33 virtual void Load(const GURL& url,
34 ScopedShellHandle service_handle) MOJO_OVERRIDE; 34 ScopedShellHandle service_handle) MOJO_OVERRIDE;
35 35
36 private: 36 private:
37 class LoadContext; 37 class LoadContext;
38 38
39 void AppCompleted(const GURL& url); 39 void AppCompleted(const GURL& url);
40 40
41 typedef std::map<GURL, LoadContext*> LoadContextMap; 41 typedef std::map<GURL, LoadContext*> LoadContextMap;
42 LoadContextMap url_to_load_context_; 42 LoadContextMap url_to_load_context_;
43 Context* context_; 43 Context* context_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(DynamicServiceLoader); 45 DISALLOW_COPY_AND_ASSIGN(DynamicServiceLoader);
46 }; 46 };
47 47
48 } // namespace shell 48 } // namespace shell
49 } // namespace mojo 49 } // namespace mojo
50 50
51 #endif // MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_ 51 #endif // MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_
OLDNEW
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698