James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 1 | // Copyright 2014 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 | |
Przemysław Pietrzkiewicz | 6384d09 | 2015-01-15 16:03:17 -0800 | [diff] [blame] | 5 | #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
| 6 | #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 7 | |
| 8 | #include <map> |
| 9 | |
Viet-Trung Luu | 3f2970c | 2015-03-05 10:21:56 -0800 | [diff] [blame] | 10 | #include "base/macros.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 11 | #include "base/memory/scoped_ptr.h" |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 12 | #include "base/memory/scoped_vector.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 13 | #include "base/memory/weak_ptr.h" |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 14 | #include "mojo/public/cpp/bindings/interface_request.h" |
Viet-Trung Luu | 3f2970c | 2015-03-05 10:21:56 -0800 | [diff] [blame] | 15 | #include "mojo/public/interfaces/application/application.mojom.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 16 | #include "mojo/public/interfaces/application/service_provider.mojom.h" |
Viet-Trung Luu | 2e11a3f | 2015-10-13 13:20:30 -0700 | [diff] [blame] | 17 | #include "mojo/services/network/interfaces/network_service.mojom.h" |
Viet-Trung Luu | 0f4f3ba | 2015-10-10 01:08:40 -0700 | [diff] [blame] | 18 | #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cache.mojom.h" |
Przemysław Pietrzkiewicz | 6384d09 | 2015-01-15 16:03:17 -0800 | [diff] [blame] | 19 | #include "shell/application_manager/application_loader.h" |
Benjamin Lerman | 71f5607 | 2015-03-12 15:04:50 +0100 | [diff] [blame] | 20 | #include "shell/application_manager/identity.h" |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 21 | #include "shell/application_manager/native_application_options.h" |
Viet-Trung Luu | 3f2970c | 2015-03-05 10:21:56 -0800 | [diff] [blame] | 22 | #include "shell/application_manager/native_runner.h" |
Viet-Trung Luu | e126c86 | 2015-03-30 19:20:45 -0700 | [diff] [blame] | 23 | #include "shell/native_application_support.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 24 | #include "url/gurl.h" |
| 25 | |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 26 | namespace base { |
| 27 | class FilePath; |
| 28 | class SequencedWorkerPool; |
| 29 | } |
| 30 | |
Viet-Trung Luu | 36faa4d | 2015-03-04 18:08:18 -0800 | [diff] [blame] | 31 | namespace shell { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 32 | |
Viet-Trung Luu | 3f2970c | 2015-03-05 10:21:56 -0800 | [diff] [blame] | 33 | class Fetcher; |
| 34 | class ShellImpl; |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 35 | |
Viet-Trung Luu | 1649201 | 2015-03-03 15:18:32 -0800 | [diff] [blame] | 36 | class ApplicationManager { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 37 | public: |
Viet-Trung Luu | 988b4be | 2015-05-15 13:00:15 -0700 | [diff] [blame] | 38 | struct Options { |
Benjamin Lerman | 9a25850 | 2015-09-17 16:53:28 +0200 | [diff] [blame] | 39 | Options() : disable_cache(false), force_offline_by_default(false) {} |
Viet-Trung Luu | 988b4be | 2015-05-15 13:00:15 -0700 | [diff] [blame] | 40 | |
| 41 | bool disable_cache; |
Benjamin Lerman | 9a25850 | 2015-09-17 16:53:28 +0200 | [diff] [blame] | 42 | bool force_offline_by_default; |
Viet-Trung Luu | 988b4be | 2015-05-15 13:00:15 -0700 | [diff] [blame] | 43 | }; |
| 44 | |
Viet-Trung Luu | 1649201 | 2015-03-03 15:18:32 -0800 | [diff] [blame] | 45 | class Delegate { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 46 | public: |
Benjamin Lerman | 605969e | 2015-04-30 13:51:04 +0200 | [diff] [blame] | 47 | // Gives the delegate a chance to apply any mappings for the specified url. |
| 48 | // This should not resolve 'mojo' urls, that is done by ResolveMojoURL(). |
| 49 | virtual GURL ResolveMappings(const GURL& url) = 0; |
| 50 | |
| 51 | // Used to map a url with the scheme 'mojo' to the appropriate url. Return |
| 52 | // |url| if the scheme is not 'mojo'. |
| 53 | virtual GURL ResolveMojoURL(const GURL& url) = 0; |
| 54 | |
| 55 | protected: |
| 56 | virtual ~Delegate() {} |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 57 | }; |
| 58 | |
| 59 | // API for testing. |
Viet-Trung Luu | 1649201 | 2015-03-03 15:18:32 -0800 | [diff] [blame] | 60 | class TestAPI { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 61 | public: |
| 62 | explicit TestAPI(ApplicationManager* manager); |
| 63 | ~TestAPI(); |
| 64 | |
| 65 | // Returns true if the shared instance has been created. |
| 66 | static bool HasCreatedInstance(); |
| 67 | // Returns true if there is a ShellImpl for this URL. |
| 68 | bool HasFactoryForURL(const GURL& url) const; |
| 69 | |
| 70 | private: |
| 71 | ApplicationManager* manager_; |
| 72 | |
| 73 | DISALLOW_COPY_AND_ASSIGN(TestAPI); |
| 74 | }; |
| 75 | |
Viet-Trung Luu | 988b4be | 2015-05-15 13:00:15 -0700 | [diff] [blame] | 76 | ApplicationManager(const Options& options, Delegate* delegate); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 77 | ~ApplicationManager(); |
| 78 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 79 | // Loads a service if necessary and establishes a new client connection. |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 80 | void ConnectToApplication( |
| 81 | const GURL& application_url, |
| 82 | const GURL& requestor_url, |
| 83 | mojo::InterfaceRequest<mojo::ServiceProvider> services, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 84 | const base::Closure& on_application_end); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 85 | |
| 86 | template <typename Interface> |
| 87 | inline void ConnectToService(const GURL& application_url, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 88 | mojo::InterfacePtr<Interface>* ptr) { |
| 89 | mojo::ScopedMessagePipeHandle service_handle = |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 90 | ConnectToServiceByName(application_url, Interface::Name_); |
Vardhan Mudunuru | dac048a | 2016-02-03 17:16:52 -0800 | [diff] [blame] | 91 | ptr->Bind(mojo::InterfaceHandle<Interface>(service_handle.Pass(), 0u)); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 92 | } |
| 93 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 94 | mojo::ScopedMessagePipeHandle ConnectToServiceByName( |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 95 | const GURL& application_url, |
| 96 | const std::string& interface_name); |
| 97 | |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 98 | void RegisterContentHandler(const std::string& mime_type, |
| 99 | const GURL& content_handler_url); |
| 100 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 101 | // Sets the default Loader to be used if not overridden by SetLoaderForURL() |
| 102 | // or SetLoaderForScheme(). |
| 103 | void set_default_loader(scoped_ptr<ApplicationLoader> loader) { |
| 104 | default_loader_ = loader.Pass(); |
| 105 | } |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 106 | void set_native_runner_factory( |
| 107 | scoped_ptr<NativeRunnerFactory> runner_factory) { |
| 108 | native_runner_factory_ = runner_factory.Pass(); |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 109 | } |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 110 | void set_blocking_pool(base::SequencedWorkerPool* blocking_pool) { |
| 111 | blocking_pool_ = blocking_pool; |
| 112 | } |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 113 | // Sets a Loader to be used for a specific url. |
| 114 | void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); |
| 115 | // Sets a Loader to be used for a specific url scheme. |
| 116 | void SetLoaderForScheme(scoped_ptr<ApplicationLoader> loader, |
| 117 | const std::string& scheme); |
Viet-Trung Luu | fbf0a4e | 2015-03-04 14:37:27 -0800 | [diff] [blame] | 118 | // These strings will be passed to the Initialize() method when an Application |
| 119 | // is instantiated. |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 120 | // TODO(vtl): Maybe we should store/compare resolved URLs? |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 121 | void SetArgsForURL(const std::vector<std::string>& args, const GURL& url); |
Viet-Trung Luu | 915cdc5 | 2015-03-09 09:55:30 -0700 | [diff] [blame] | 122 | // These options will be used in running any native application at |url| |
| 123 | // (which shouldn't contain a query string). (|url| will be mapped and |
| 124 | // resolved, and any application whose base resolved URL matches it will have |
| 125 | // |options| applied.) |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 126 | // Note: Calling this for a URL will add (default) options for that URL if |
| 127 | // necessary. |
Viet-Trung Luu | fbf0a4e | 2015-03-04 14:37:27 -0800 | [diff] [blame] | 128 | // TODO(vtl): This may not do what's desired if the resolved URL results in an |
| 129 | // HTTP redirect. Really, we want options to be identified with a particular |
| 130 | // implementation, maybe via a signed manifest or something like that. |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 131 | NativeApplicationOptions* GetNativeApplicationOptionsForURL(const GURL& url); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 132 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 133 | // Destroys all Shell-ends of connections established with Applications. |
| 134 | // Applications connected by this ApplicationManager will observe pipe errors |
| 135 | // and have a chance to shutdown. |
| 136 | void TerminateShellConnections(); |
| 137 | |
James Robinson | f571318 | 2015-01-13 17:41:34 -0800 | [diff] [blame] | 138 | // Removes a ShellImpl when it encounters an error. |
| 139 | void OnShellImplError(ShellImpl* shell_impl); |
| 140 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 141 | private: |
Benjamin Lerman | 7c05714 | 2014-10-31 18:23:10 +0100 | [diff] [blame] | 142 | class ContentHandlerConnection; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 143 | |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 144 | using URLToLoaderMap = std::map<GURL, scoped_ptr<ApplicationLoader>>; |
| 145 | using SchemeToLoaderMap = |
| 146 | std::map<std::string, scoped_ptr<ApplicationLoader>>; |
| 147 | using IdentityToShellImplMap = std::map<Identity, scoped_ptr<ShellImpl>>; |
Sean Klein | 78eb28d | 2015-11-17 10:15:09 -0800 | [diff] [blame] | 148 | using IdentityToContentHandlerMap = |
| 149 | std::map<Identity, scoped_ptr<ContentHandlerConnection>>; |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 150 | using URLToArgsMap = std::map<GURL, std::vector<std::string>>; |
| 151 | using MimeTypeToURLMap = std::map<std::string, GURL>; |
| 152 | using URLToNativeOptionsMap = std::map<GURL, NativeApplicationOptions>; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 153 | |
Benjamin Lerman | acf32fb | 2015-03-24 10:54:37 +0100 | [diff] [blame] | 154 | void ConnectToApplicationWithParameters( |
| 155 | const GURL& application_url, |
| 156 | const GURL& requestor_url, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 157 | mojo::InterfaceRequest<mojo::ServiceProvider> services, |
Benjamin Lerman | 993869e | 2015-03-24 13:35:28 +0100 | [diff] [blame] | 158 | const base::Closure& on_application_end, |
Benjamin Lerman | 128ca7d | 2015-03-24 12:02:49 +0100 | [diff] [blame] | 159 | const std::vector<std::string>& pre_redirect_parameters); |
Benjamin Lerman | acf32fb | 2015-03-24 10:54:37 +0100 | [diff] [blame] | 160 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 161 | bool ConnectToRunningApplication( |
| 162 | const GURL& resolved_url, |
| 163 | const GURL& requestor_url, |
Viet-Trung Luu | d588c94 | 2016-05-09 16:49:45 -0700 | [diff] [blame] | 164 | mojo::InterfaceRequest<mojo::ServiceProvider>* services); |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 165 | |
| 166 | bool ConnectToApplicationWithLoader( |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 167 | const GURL& resolved_url, |
| 168 | const GURL& requestor_url, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 169 | mojo::InterfaceRequest<mojo::ServiceProvider>* services, |
Benjamin Lerman | 993869e | 2015-03-24 13:35:28 +0100 | [diff] [blame] | 170 | const base::Closure& on_application_end, |
Benjamin Lerman | acf32fb | 2015-03-24 10:54:37 +0100 | [diff] [blame] | 171 | const std::vector<std::string>& parameters, |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 172 | ApplicationLoader* loader); |
| 173 | |
Sean Klein | 78eb28d | 2015-11-17 10:15:09 -0800 | [diff] [blame] | 174 | // Creates an Identity for the service identified by |resolved_url|. |
| 175 | // If |new_process_per_connection| is true for the URL's options, then the |
| 176 | // identity is unique. Otherwise, repeated invocations with the same |
Benjamin Lerman | e58454c | 2015-11-24 14:59:06 +0100 | [diff] [blame] | 177 | // |resolved_url| will result in an equivalent Identity. If |strip_query| is |
| 178 | // true, the query is stripped before creating the Identity. |
| 179 | Identity MakeApplicationIdentity(const GURL& resolved_url, |
| 180 | bool strip_query = true); |
Sean Klein | 78eb28d | 2015-11-17 10:15:09 -0800 | [diff] [blame] | 181 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 182 | mojo::InterfaceRequest<mojo::Application> RegisterShell( |
Aaron Boodman | b34bcbf | 2015-03-02 10:05:31 -0800 | [diff] [blame] | 183 | // The URL after resolution and redirects, including the querystring. |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 184 | const GURL& resolved_url, |
| 185 | const GURL& requestor_url, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 186 | mojo::InterfaceRequest<mojo::ServiceProvider> services, |
Benjamin Lerman | 993869e | 2015-03-24 13:35:28 +0100 | [diff] [blame] | 187 | const base::Closure& on_application_end, |
Benjamin Lerman | acf32fb | 2015-03-24 10:54:37 +0100 | [diff] [blame] | 188 | const std::vector<std::string>& parameters); |
Aaron Boodman | cd7b911 | 2014-11-06 21:44:49 -0800 | [diff] [blame] | 189 | |
Dave Moore | 0504d06 | 2015-01-23 15:33:29 -0800 | [diff] [blame] | 190 | ShellImpl* GetShellImpl(const GURL& url); |
| 191 | |
Viet-Trung Luu | d588c94 | 2016-05-09 16:49:45 -0700 | [diff] [blame] | 192 | void ConnectToClient(ShellImpl* shell_impl, |
| 193 | const GURL& resolved_url, |
| 194 | const GURL& requestor_url, |
| 195 | mojo::InterfaceRequest<mojo::ServiceProvider> services); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 196 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 197 | void HandleFetchCallback( |
| 198 | const GURL& requestor_url, |
| 199 | mojo::InterfaceRequest<mojo::ServiceProvider> services, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 200 | const base::Closure& on_application_end, |
| 201 | const std::vector<std::string>& parameters, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 202 | scoped_ptr<Fetcher> fetcher); |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 203 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 204 | void RunNativeApplication( |
| 205 | mojo::InterfaceRequest<mojo::Application> application_request, |
Viet-Trung Luu | 64bb17c | 2015-10-02 17:02:04 -0700 | [diff] [blame] | 206 | const NativeApplicationOptions& options, |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 207 | scoped_ptr<Fetcher> fetcher, |
| 208 | const base::FilePath& file_path, |
| 209 | bool path_exists); |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 210 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 211 | void LoadWithContentHandler( |
| 212 | const GURL& content_handler_url, |
| 213 | mojo::InterfaceRequest<mojo::Application> application_request, |
| 214 | mojo::URLResponsePtr url_response); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 215 | |
Viet-Trung Luu | a417b14 | 2015-03-31 11:24:44 -0700 | [diff] [blame] | 216 | // Returns the appropriate loader for |url|, or null if there is no loader |
| 217 | // configured for the URL. |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 218 | ApplicationLoader* GetLoaderForURL(const GURL& url); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 219 | |
Viet-Trung Luu | bd07e3a | 2015-04-09 12:43:29 -0700 | [diff] [blame] | 220 | // Removes a mojo::ContentHandler when it encounters an error. |
Benjamin Lerman | 7c05714 | 2014-10-31 18:23:10 +0100 | [diff] [blame] | 221 | void OnContentHandlerError(ContentHandlerConnection* content_handler); |
| 222 | |
| 223 | // Returns the arguments for the given url. |
Benjamin Lerman | acf32fb | 2015-03-24 10:54:37 +0100 | [diff] [blame] | 224 | std::vector<std::string> GetArgsForURL(const GURL& url); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 225 | |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 226 | void CleanupRunner(NativeRunner* runner); |
| 227 | |
Viet-Trung Luu | 988b4be | 2015-05-15 13:00:15 -0700 | [diff] [blame] | 228 | const Options options_; |
Viet-Trung Luu | fbf0a4e | 2015-03-04 14:37:27 -0800 | [diff] [blame] | 229 | Delegate* const delegate_; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 230 | // Loader management. |
Aaron Boodman | bfc1118 | 2015-02-19 12:42:19 -0800 | [diff] [blame] | 231 | // Loaders are chosen in the order they are listed here. |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 232 | URLToLoaderMap url_to_loader_; |
| 233 | SchemeToLoaderMap scheme_to_loader_; |
| 234 | scoped_ptr<ApplicationLoader> default_loader_; |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 235 | scoped_ptr<NativeRunnerFactory> native_runner_factory_; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 236 | |
Benjamin Lerman | 71f5607 | 2015-03-12 15:04:50 +0100 | [diff] [blame] | 237 | IdentityToShellImplMap identity_to_shell_impl_; |
Sean Klein | 78eb28d | 2015-11-17 10:15:09 -0800 | [diff] [blame] | 238 | IdentityToContentHandlerMap identity_to_content_handler_; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 239 | URLToArgsMap url_to_args_; |
Viet-Trung Luu | fbf0a4e | 2015-03-04 14:37:27 -0800 | [diff] [blame] | 240 | // Note: The keys are URLs after mapping and resolving. |
| 241 | URLToNativeOptionsMap url_to_native_options_; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 242 | |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 243 | base::SequencedWorkerPool* blocking_pool_; |
Benjamin Lerman | 5d429aa | 2015-05-07 16:21:00 +0200 | [diff] [blame] | 244 | mojo::URLResponseDiskCachePtr url_response_disk_cache_; |
Colin Blundell | 8ca4d65 | 2015-06-05 16:41:30 +0200 | [diff] [blame] | 245 | mojo::NetworkServicePtr network_service_; |
Benjamin Lerman | d15e3f4 | 2015-09-17 11:26:18 +0200 | [diff] [blame] | 246 | mojo::NetworkServicePtr authenticating_network_service_; |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 247 | MimeTypeToURLMap mime_type_to_url_; |
| 248 | ScopedVector<NativeRunner> native_runners_; |
Colin Blundell | 8ca4d65 | 2015-06-05 16:41:30 +0200 | [diff] [blame] | 249 | bool initialized_authentication_interceptor_; |
Dave Moore | cc0e4f9 | 2015-03-10 15:23:04 -0700 | [diff] [blame] | 250 | base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; |
Aaron Boodman | 5e7f904 | 2015-02-24 17:37:34 -0800 | [diff] [blame] | 251 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 252 | DISALLOW_COPY_AND_ASSIGN(ApplicationManager); |
| 253 | }; |
| 254 | |
Viet-Trung Luu | 36faa4d | 2015-03-04 18:08:18 -0800 | [diff] [blame] | 255 | } // namespace shell |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 256 | |
Przemysław Pietrzkiewicz | 6384d09 | 2015-01-15 16:03:17 -0800 | [diff] [blame] | 257 | #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ |