OLD | NEW |
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_LOADER_H_ | 5 #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_LOADER_H_ |
6 #define SHELL_APPLICATION_MANAGER_APPLICATION_LOADER_H_ | 6 #define SHELL_APPLICATION_MANAGER_APPLICATION_LOADER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "mojo/public/cpp/system/core.h" | 9 #include "mojo/public/cpp/system/core.h" |
10 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 10 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
11 #include "mojo/shell/public/interfaces/application.mojom.h" | |
12 #include "mojo/shell/public/interfaces/shell.mojom.h" | 11 #include "mojo/shell/public/interfaces/shell.mojom.h" |
| 12 #include "mojo/shell/public/interfaces/shell_client.mojom.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 | 16 |
17 class Application; | 17 class Application; |
18 | 18 |
19 namespace shell { | 19 namespace shell { |
20 | 20 |
21 class ApplicationManager; | 21 class ApplicationManager; |
22 | 22 |
23 // Interface to implement special application loading behavior for a particular | 23 // Interface to implement special application loading behavior for a particular |
24 // URL or scheme. | 24 // URL or scheme. |
25 class ApplicationLoader { | 25 class ApplicationLoader { |
26 public: | 26 public: |
27 virtual ~ApplicationLoader() {} | 27 virtual ~ApplicationLoader() {} |
28 | 28 |
29 virtual void Load( | 29 virtual void Load(const GURL& url, |
30 const GURL& url, | 30 InterfaceRequest<mojom::ShellClient> request) = 0; |
31 InterfaceRequest<mojom::Application> application_request) = 0; | |
32 | 31 |
33 protected: | 32 protected: |
34 ApplicationLoader() {} | 33 ApplicationLoader() {} |
35 }; | 34 }; |
36 | 35 |
37 } // namespace shell | 36 } // namespace shell |
38 } // namespace mojo | 37 } // namespace mojo |
39 | 38 |
40 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_LOADER_H_ | 39 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_LOADER_H_ |
OLD | NEW |