Chromium Code Reviews| Index: mojo/shell/dynamic_service_loader.h |
| diff --git a/mojo/shell/dynamic_service_loader.h b/mojo/shell/dynamic_service_loader.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9020972dcecf58e37605cf4a561127d1ad0d99c3 |
| --- /dev/null |
| +++ b/mojo/shell/dynamic_service_loader.h |
| @@ -0,0 +1,39 @@ |
| +// 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_DYNAMIC_SERVICE_LOADER_H_ |
| +#define MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_ |
| + |
| +#include <map> |
| + |
| +#include "mojo/public/system/core_cpp.h" |
| +#include "mojo/shell/service_manager.h" |
| +#include "url/gurl.h" |
| + |
| +namespace mojo { |
| +namespace shell { |
| + |
| +class Context; |
| + |
| +class DynamicServiceLoader : public ServiceManager::Loader { |
|
viettrungluu
2014/01/03 17:44:49
A class-level comment would be nice.
DaveMoore
2014/01/03 18:05:49
Done.
|
| + public: |
| + explicit DynamicServiceLoader(Context* context); |
| + virtual ~DynamicServiceLoader(); |
| + |
| + private: |
| + class LoadContext; |
| + |
| + virtual void Load(const GURL& url, |
| + ScopedMessagePipeHandle service_handle) MOJO_OVERRIDE; |
| + |
| + typedef std::map<GURL, LoadContext*> LoadContextMap; |
| + LoadContextMap url_to_load_context_; |
| + Context* context_; |
| + DISALLOW_COPY_AND_ASSIGN(DynamicServiceLoader); |
|
viettrungluu
2014/01/03 17:44:49
#include "base/basictypes.h" for this.
DaveMoore
2014/01/03 18:05:49
Done.
|
| +}; |
| + |
| +} // namespace shell |
| +} // namespace mojo |
| + |
| +#endif // MOJO_SHELL_DYNAMIC_SERVICE_LOADER_H_ |