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