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

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

Issue 1352663002: Extract some stuff into PackageManager (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
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // A class implementing this interface assists Shell::ConnectToApplication in
19 // resolving URLs and fetching the applications located therein.
20 class ApplicationFetcher {
21 public:
22 virtual ~ApplicationFetcher() {}
23
24 // Called once, during initialization, to tell the fetcher about the
25 // associated ApplicationManager.
26 virtual void SetApplicationManager(ApplicationManager* manager) = 0;
27
28 // Resolves |url| to its canonical form. e.g. for mojo: urls, returns a file:
29 // url with a path ending in .mojo.
30 virtual GURL ResolveURL(const GURL& url) = 0;
31
32 // Asks the delegate to fetch the specified url. |url| must be unresolved,
33 // i.e. ResolveURL() above must not have been called on it.
34 // TODO(beng): figure out how not to expose Fetcher at all at this layer.
35 virtual void FetchRequest(
36 URLRequestPtr request,
37 const Fetcher::FetchCallback& loader_callback) = 0;
38 };
39
40 } // namespace shell
41 } // namespace mojo
42
43 #endif // MOJO_SHELL_APPLICATION_FETCHER_H_
OLDNEW
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698