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

Side by Side Diff: mojo/shell/application_fetcher.h

Issue 1342503003: Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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
(Empty)
1 // Copyright 2015 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
5 #ifndef MOJO_SHELL_APPLICATION_FETCHER_H_
6 #define MOJO_SHELL_APPLICATION_FETCHER_H_
7
8 #include "mojo/shell/fetcher.h"
9 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
10
11 class GURL;
12
13 namespace mojo {
14 namespace shell {
15
16 class ApplicationManager;
17
18 class ApplicationFetcher {
sky 2015/09/11 23:05:27 Add description.
19 public:
20 virtual ~ApplicationFetcher() {}
21
22 // Called once, during initialization, to tell the fetcher about the
23 // associated ApplicationManager.
24 virtual void SetApplicationManager(ApplicationManager* manager) = 0;
25
26 // Resolves |url| to its canonical form. e.g. for mojo: urls, returns a file:
27 // url with a path ending in .mojo.
28 virtual GURL ResolveURL(const GURL& url) = 0;
29
30 // Asks the delegate to fetch the specified url. |url| must be unresolved,
31 // i.e. ResolveURL() above must not have been called on it.
32 // TODO(beng): figure out how not to expose Fetcher at all at this layer.
sky 2015/09/11 23:05:27 Indeed. It would be nice if the callback was defin
33 virtual void FetchRequest(
34 URLRequestPtr request,
35 const Fetcher::FetchCallback& loader_callback) = 0;
36 };
37
38 } // namespace shell
39 } // namespace mojo
40
sky 2015/09/11 23:05:27 nit: only one newline.
41
42 #endif // MOJO_SHELL_APPLICATION_FETCHER_H_
OLDNEW
« mojo/runner/context.h ('K') | « mojo/shell/DEPS ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698