Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: shell/application_manager/application_manager.h

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 5 #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "mojo/public/cpp/bindings/interface_request.h" 14 #include "mojo/public/cpp/bindings/interface_request.h"
15 #include "mojo/public/interfaces/application/application.mojom.h" 15 #include "mojo/public/interfaces/application/application.mojom.h"
16 #include "mojo/public/interfaces/application/service_provider.mojom.h" 16 #include "mojo/public/interfaces/application/service_provider.mojom.h"
17 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 17 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
18 #include "mojo/services/service_cache/public/interfaces/service_cache.mojom.h"
18 #include "shell/application_manager/application_loader.h" 19 #include "shell/application_manager/application_loader.h"
19 #include "shell/application_manager/identity.h" 20 #include "shell/application_manager/identity.h"
20 #include "shell/application_manager/native_runner.h" 21 #include "shell/application_manager/native_runner.h"
21 #include "shell/native_application_support.h" 22 #include "shell/native_application_support.h"
22 #include "url/gurl.h" 23 #include "url/gurl.h"
23 24
24 namespace base { 25 namespace base {
25 class FilePath; 26 class FilePath;
26 class SequencedWorkerPool; 27 class SequencedWorkerPool;
27 } 28 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const GURL& requestor_url, 182 const GURL& requestor_url,
182 mojo::InterfaceRequest<mojo::ServiceProvider> services, 183 mojo::InterfaceRequest<mojo::ServiceProvider> services,
183 mojo::ServiceProviderPtr exposed_services); 184 mojo::ServiceProviderPtr exposed_services);
184 185
185 void HandleFetchCallback( 186 void HandleFetchCallback(
186 const GURL& requestor_url, 187 const GURL& requestor_url,
187 mojo::InterfaceRequest<mojo::ServiceProvider> services, 188 mojo::InterfaceRequest<mojo::ServiceProvider> services,
188 mojo::ServiceProviderPtr exposed_services, 189 mojo::ServiceProviderPtr exposed_services,
189 const base::Closure& on_application_end, 190 const base::Closure& on_application_end,
190 const std::vector<std::string>& parameters, 191 const std::vector<std::string>& parameters,
191 NativeApplicationCleanup cleanup,
192 scoped_ptr<Fetcher> fetcher); 192 scoped_ptr<Fetcher> fetcher);
193 193
194 void RunNativeApplication( 194 void RunNativeApplication(
195 mojo::InterfaceRequest<mojo::Application> application_request, 195 mojo::InterfaceRequest<mojo::Application> application_request,
196 const NativeRunnerFactory::Options& options, 196 const NativeRunnerFactory::Options& options,
197 NativeApplicationCleanup cleanup,
198 scoped_ptr<Fetcher> fetcher, 197 scoped_ptr<Fetcher> fetcher,
199 const base::FilePath& file_path, 198 const base::FilePath& file_path,
200 bool path_exists); 199 bool path_exists);
201 200
202 void LoadWithContentHandler( 201 void LoadWithContentHandler(
203 const GURL& content_handler_url, 202 const GURL& content_handler_url,
204 mojo::InterfaceRequest<mojo::Application> application_request, 203 mojo::InterfaceRequest<mojo::Application> application_request,
205 mojo::URLResponsePtr url_response); 204 mojo::URLResponsePtr url_response);
206 205
207 // Returns the appropriate loader for |url|, or null if there is no loader 206 // Returns the appropriate loader for |url|, or null if there is no loader
(...skipping 17 matching lines...) Expand all
225 scoped_ptr<NativeRunnerFactory> native_runner_factory_; 224 scoped_ptr<NativeRunnerFactory> native_runner_factory_;
226 225
227 IdentityToShellImplMap identity_to_shell_impl_; 226 IdentityToShellImplMap identity_to_shell_impl_;
228 URLToContentHandlerMap url_to_content_handler_; 227 URLToContentHandlerMap url_to_content_handler_;
229 URLToArgsMap url_to_args_; 228 URLToArgsMap url_to_args_;
230 // Note: The keys are URLs after mapping and resolving. 229 // Note: The keys are URLs after mapping and resolving.
231 URLToNativeOptionsMap url_to_native_options_; 230 URLToNativeOptionsMap url_to_native_options_;
232 231
233 base::SequencedWorkerPool* blocking_pool_; 232 base::SequencedWorkerPool* blocking_pool_;
234 mojo::NetworkServicePtr network_service_; 233 mojo::NetworkServicePtr network_service_;
234 mojo::service_cache::ServiceCachePtr service_cache_;
235 MimeTypeToURLMap mime_type_to_url_; 235 MimeTypeToURLMap mime_type_to_url_;
236 ScopedVector<NativeRunner> native_runners_; 236 ScopedVector<NativeRunner> native_runners_;
237 bool disable_cache_; 237 bool disable_cache_;
238 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; 238 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_;
239 239
240 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); 240 DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
241 }; 241 };
242 242
243 } // namespace shell 243 } // namespace shell
244 244
245 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 245 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698