Chromium Code Reviews| Index: mojo/shell/service_manager.h |
| diff --git a/mojo/shell/service_manager.h b/mojo/shell/service_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b61e9a750ec1fcda7964d3cc0cc67d7aa7c5ffd9 |
| --- /dev/null |
| +++ b/mojo/shell/service_manager.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MOJO_SHELL_SERVICE_MANAGER_H_ |
| +#define MOJO_SHELL_SERVICE_MANAGER_H_ |
| + |
| +#include <map> |
| + |
| +#include "base/callback.h" |
| +#include "base/synchronization/lock.h" |
| +#include "mojo/public/system/core_cpp.h" |
| +#include "url/gurl.h" |
| + |
| +namespace mojo { |
| +namespace shell { |
| + |
| +class Context; |
| + |
| +class ServiceManager { |
| + public: |
| + ServiceManager(Context* context); |
| + 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.
|
| + |
| + void Connect(const GURL& url, ScopedMessagePipeHandle client_handle); |
| + |
| + private: |
| + class Service; |
| + |
| + Context* context_; |
| + typedef std::map<GURL, Service*> ServiceMap; |
| + ServiceMap url_to_service_; |
| + base::Lock service_map_lock_; |
| + DISALLOW_COPY_AND_ASSIGN(ServiceManager); |
| +}; |
| + |
| +} // namespace shell |
| +} // namespace mojo |
| + |
| +#endif // MOJO_SHELL_SERVICE_MANAGER_H_ |