OLD | NEW |
---|---|
(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_ | |
OLD | NEW |