Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_SHELL_SERVICE_MANAGER_H_ | |
| 6 #define MOJO_SHELL_SERVICE_MANAGER_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 #include "base/synchronization/lock.h" | |
| 12 #include "mojo/public/system/core_cpp.h" | |
| 13 #include "url/gurl.h" | |
| 14 | |
| 15 namespace mojo { | |
| 16 namespace shell { | |
| 17 | |
| 18 class Context; | |
| 19 | |
| 20 class ServiceManager { | |
| 21 public: | |
| 22 ServiceManager(Context* context); | |
| 23 virtual ~ServiceManager(); | |
|
abarth-chromium
2013/12/10 01:06:03
Please mark one-argument constructors explicit. W
DaveMoore
2013/12/10 03:00:45
Done.
| |
| 24 | |
| 25 void Connect(const GURL& url, ScopedMessagePipeHandle client_handle); | |
| 26 | |
| 27 private: | |
| 28 class Service; | |
| 29 | |
| 30 Context* context_; | |
| 31 typedef std::map<GURL, Service*> ServiceMap; | |
| 32 ServiceMap url_to_service_; | |
| 33 base::Lock service_map_lock_; | |
| 34 DISALLOW_COPY_AND_ASSIGN(ServiceManager); | |
| 35 }; | |
| 36 | |
| 37 } // namespace shell | |
| 38 } // namespace mojo | |
| 39 | |
| 40 #endif // MOJO_SHELL_SERVICE_MANAGER_H_ | |
| OLD | NEW |