Chromium Code Reviews| Index: mojo/shell/application_manager.h |
| diff --git a/mojo/shell/application_manager.h b/mojo/shell/application_manager.h |
| index 6f93628e638f8443119a4b4c36ad133c4210bb73..6466e57ace45ed8f6a15ec33b1bdbe7f21273082 100644 |
| --- a/mojo/shell/application_manager.h |
| +++ b/mojo/shell/application_manager.h |
| @@ -55,6 +55,9 @@ class ApplicationManager { |
| }; |
| explicit ApplicationManager(scoped_ptr<PackageManager> package_manager); |
| + ApplicationManager(scoped_ptr<PackageManager> package_manager, |
| + scoped_ptr<NativeRunnerFactory> native_runner_factory, |
| + base::TaskRunner* task_runner); |
|
yzshen1
2015/09/23 16:53:46
Please comment on what this task_runner is used fo
|
| ~ApplicationManager(); |
| // Loads a service if necessary and establishes a new client connection. |
| @@ -66,13 +69,7 @@ class ApplicationManager { |
| void set_default_loader(scoped_ptr<ApplicationLoader> loader) { |
| default_loader_ = loader.Pass(); |
| } |
| - void set_native_runner_factory( |
| - scoped_ptr<NativeRunnerFactory> runner_factory) { |
| - native_runner_factory_ = runner_factory.Pass(); |
| - } |
| - void set_blocking_pool(base::SequencedWorkerPool* blocking_pool) { |
| - blocking_pool_ = blocking_pool; |
| - } |
| + |
| // Sets a Loader to be used for a specific url. |
| void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); |
| @@ -84,16 +81,10 @@ class ApplicationManager { |
| // Removes a ApplicationInstance when it encounters an error. |
| void OnApplicationInstanceError(ApplicationInstance* instance); |
| - // Removes a ContentHandler when its connection is closed. |
| - void OnContentHandlerConnectionClosed( |
| - ContentHandlerConnection* content_handler); |
| - |
| ApplicationInstance* GetApplicationInstance(const Identity& identity) const; |
| private: |
| using IdentityToInstanceMap = std::map<Identity, ApplicationInstance*>; |
| - using IdentityToContentHandlerMap = |
| - std::map<Identity, ContentHandlerConnection*>; |
| using URLToLoaderMap = std::map<GURL, ApplicationLoader*>; |
| // Takes the contents of |params| only when it returns true. |
| @@ -116,14 +107,6 @@ class ApplicationManager { |
| const base::FilePath& file_path, |
| bool path_exists); |
| - void LoadWithContentHandler( |
| - const Identity& source, |
| - const Identity& content_handler, |
| - const Shell::ConnectToApplicationCallback& connect_callback, |
| - ApplicationInstance* app, |
| - InterfaceRequest<Application> application_request, |
| - URLResponsePtr url_response); |
| - |
| // Returns the appropriate loader for |url|, or the default loader if there is |
| // no loader configured for the URL. |
| ApplicationLoader* GetLoaderForURL(const GURL& url); |
| @@ -135,15 +118,12 @@ class ApplicationManager { |
| // Loaders are chosen in the order they are listed here. |
| URLToLoaderMap url_to_loader_; |
| scoped_ptr<ApplicationLoader> default_loader_; |
| - scoped_ptr<NativeRunnerFactory> native_runner_factory_; |
| IdentityToInstanceMap identity_to_instance_; |
| - IdentityToContentHandlerMap identity_to_content_handler_; |
| - base::SequencedWorkerPool* blocking_pool_; |
| + base::TaskRunner* task_runner_; |
| + scoped_ptr<NativeRunnerFactory> native_runner_factory_; |
| ScopedVector<NativeRunner> native_runners_; |
| - // Counter used to assign ids to content_handlers. |
| - uint32_t content_handler_id_counter_; |
| base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |