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 explicit ServiceManager(Context* context); |
| 23 ~ServiceManager(); |
| 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 DISALLOW_COPY_AND_ASSIGN(ServiceManager); |
| 34 }; |
| 35 |
| 36 } // namespace shell |
| 37 } // namespace mojo |
| 38 |
| 39 #endif // MOJO_SHELL_SERVICE_MANAGER_H_ |
OLD | NEW |