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

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

Issue 122173004: Add test for ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update new copyrights Created 6 years, 11 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/dynamic_service_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_
6 #define MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_
7
8 #include <map>
9
10 #include "base/basictypes.h"
11 #include "mojo/public/system/core_cpp.h"
12 #include "mojo/shell/service_manager.h"
13 #include "url/gurl.h"
14
15 namespace mojo {
16 namespace shell {
17
18 class Context;
19
20 // A subclass of ServiceManager::Loader that loads a dynamic library containing
21 // the implementation of the service.
22 class DynamicServiceLoader : public ServiceManager::Loader {
23 public:
24 explicit DynamicServiceLoader(Context* context);
25 virtual ~DynamicServiceLoader();
26
27 private:
28 class LoadContext;
29
30 // Initiates the dynamic load. If the url is a mojo: scheme then the name
31 // specified will be modified to the platform's naming scheme. Also the
32 // value specified to the --origin command line argument will be used as the
33 // host / port.
34 virtual void Load(const GURL& url,
35 ScopedMessagePipeHandle service_handle) MOJO_OVERRIDE;
36
37 typedef std::map<GURL, LoadContext*> LoadContextMap;
38 LoadContextMap url_to_load_context_;
39 Context* context_;
40 DISALLOW_COPY_AND_ASSIGN(DynamicServiceLoader);
41 };
42
43 } // namespace shell
44 } // namespace mojo
45
46 #endif // MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_
OLDNEW
« no previous file with comments | « mojo/shell/context.cc ('k') | mojo/shell/dynamic_service_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698