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" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 | 22 |
23 // A delegate interface to extension implentation. | 23 // A delegate interface to extension implentation. |
24 class ATHENA_EXPORT ExtensionsDelegate { | 24 class ATHENA_EXPORT ExtensionsDelegate { |
25 public: | 25 public: |
26 static ExtensionsDelegate* Get(content::BrowserContext* context); | 26 static ExtensionsDelegate* Get(content::BrowserContext* context); |
27 | 27 |
28 // Creates the extension delegate for app shell environment. | 28 // Creates the extension delegate for app shell environment. |
29 static void CreateExtensionsDelegateForShell( | 29 static void CreateExtensionsDelegateForShell( |
30 content::BrowserContext* context); | 30 content::BrowserContext* context); |
31 | 31 |
32 // Creates the extension delegate for chrome environment. | |
33 static void CreateExtensionsDelegateForChrome( | |
34 content::BrowserContext* context); | |
35 | |
32 // Creates the extension delegate for test environment. | 36 // Creates the extension delegate for test environment. |
33 static void CreateExtensionsDelegateForTest(); | 37 static void CreateExtensionsDelegateForTest(); |
34 | 38 |
35 // Deletes the singleton instance. This must be called in the reverse | 39 // Deletes the singleton instance. This must be called in the reverse |
36 // order of the initialization. | 40 // order of the initialization. |
37 static void Shutdown(); | 41 static void Shutdown(); |
38 | 42 |
39 ExtensionsDelegate(); | 43 ExtensionsDelegate(); |
40 virtual ~ExtensionsDelegate(); | 44 virtual ~ExtensionsDelegate(); |
41 | 45 |
42 virtual content::BrowserContext* GetBrowserContext() const = 0; | 46 virtual content::BrowserContext* GetBrowserContext() const = 0; |
43 | 47 |
44 // Returns the set of extensions that are currently installed. | 48 // Returns the set of extensions that are currently installed. |
45 virtual const extensions::ExtensionSet& GetInstalledExtensions() = 0; | 49 virtual const extensions::ExtensionSet& GetInstalledExtensions() = 0; |
46 | 50 |
47 // Starts an application. Returns true if the application was | 51 // Starts an application. Returns true if the application was |
48 // successfully started. | 52 // successfully started. |
53 // TODO(oshima): Add source type. | |
Yoyo Zhou
2014/08/29 22:23:29
What is meant by 'source type'?
oshima
2014/08/29 23:25:26
There is c/b/ui/ash/launcher/chrome_launcher_types
| |
49 virtual bool LaunchApp(const std::string& app_id) = 0; | 54 virtual bool LaunchApp(const std::string& app_id) = 0; |
50 | 55 |
51 // Unload an application. Returns true if the application was | 56 // Unload an application. Returns true if the application was |
52 // successfully unloaded. | 57 // successfully unloaded. |
53 virtual bool UnloadApp(const std::string& app_id) = 0; | 58 virtual bool UnloadApp(const std::string& app_id) = 0; |
54 }; | 59 }; |
55 | 60 |
56 } // namespace athena | 61 } // namespace athena |
57 | 62 |
58 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | 63 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ |
OLD | NEW |