| 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 class WebContents; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 class ExtensionInstallUI; |
| 18 class ExtensionSet; | 19 class ExtensionSet; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace athena { | 22 namespace athena { |
| 22 | 23 |
| 23 // A delegate interface to extension implentation. | 24 // A delegate interface to extension implentation. |
| 24 class ATHENA_EXPORT ExtensionsDelegate { | 25 class ATHENA_EXPORT ExtensionsDelegate { |
| 25 public: | 26 public: |
| 26 static ExtensionsDelegate* Get(content::BrowserContext* context); | 27 static ExtensionsDelegate* Get(content::BrowserContext* context); |
| 27 | 28 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 45 virtual const extensions::ExtensionSet& GetInstalledExtensions() = 0; | 46 virtual const extensions::ExtensionSet& GetInstalledExtensions() = 0; |
| 46 | 47 |
| 47 // Starts an application. Returns true if the application was | 48 // Starts an application. Returns true if the application was |
| 48 // successfully started. | 49 // successfully started. |
| 49 // TODO(oshima): Add launcher source type. (see chrome_launcher_types.h) | 50 // TODO(oshima): Add launcher source type. (see chrome_launcher_types.h) |
| 50 virtual bool LaunchApp(const std::string& app_id) = 0; | 51 virtual bool LaunchApp(const std::string& app_id) = 0; |
| 51 | 52 |
| 52 // Unload an application. Returns true if the application was | 53 // Unload an application. Returns true if the application was |
| 53 // successfully unloaded. | 54 // successfully unloaded. |
| 54 virtual bool UnloadApp(const std::string& app_id) = 0; | 55 virtual bool UnloadApp(const std::string& app_id) = 0; |
| 56 |
| 57 virtual extensions::ExtensionInstallUI* CreateExtensionInstallUI() = 0; |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 } // namespace athena | 60 } // namespace athena |
| 58 | 61 |
| 59 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | 62 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ |
| OLD | NEW |