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 ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | 5 #ifndef ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ |
6 #define ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | 6 #define ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "athena/athena_export.h" | 10 #include "athena/athena_export.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class BrowserContext; | 13 class BrowserContext; |
| 14 class WebContents; |
14 } | 15 } |
15 | 16 |
16 namespace extensions { | 17 namespace extensions { |
17 class ExtensionSet; | 18 class ExtensionSet; |
18 } | 19 } |
19 | 20 |
20 namespace athena { | 21 namespace athena { |
21 | 22 |
22 // A delegate interface to extension implentation. | 23 // A delegate interface to extension implentation. |
23 class ATHENA_EXPORT ExtensionsDelegate { | 24 class ATHENA_EXPORT ExtensionsDelegate { |
(...skipping 12 matching lines...) Expand all Loading... |
36 static void Shutdown(); | 37 static void Shutdown(); |
37 | 38 |
38 ExtensionsDelegate(); | 39 ExtensionsDelegate(); |
39 virtual ~ExtensionsDelegate(); | 40 virtual ~ExtensionsDelegate(); |
40 | 41 |
41 virtual content::BrowserContext* GetBrowserContext() const = 0; | 42 virtual content::BrowserContext* GetBrowserContext() const = 0; |
42 | 43 |
43 // Returns the set of extensions that are currently installed. | 44 // Returns the set of extensions that are currently installed. |
44 virtual const extensions::ExtensionSet& GetInstalledExtensions() = 0; | 45 virtual const extensions::ExtensionSet& GetInstalledExtensions() = 0; |
45 | 46 |
46 // Launch an application specified by |app_id|. | 47 // Starts an application. Returns true if the application was |
47 virtual void LaunchApp(const std::string& app_id) = 0; | 48 // successfully started. |
| 49 virtual bool LaunchApp(const std::string& app_id) = 0; |
| 50 |
| 51 // Unload an application. Returns true if the application was |
| 52 // successfully unloaded. |
| 53 virtual bool UnloadApp(const std::string& app_id) = 0; |
48 }; | 54 }; |
49 | 55 |
50 } // namespace athena | 56 } // namespace athena |
51 | 57 |
52 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | 58 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ |
OLD | NEW |