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