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