| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
| 10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" |
| 11 #include "chrome/common/notification_observer.h" | 11 #include "chrome/common/notification_observer.h" |
| 12 #include "chrome/common/notification_registrar.h" | 12 #include "chrome/common/notification_registrar.h" |
| 13 | 13 |
| 14 class ExtensionsService; | 14 class ExtensionsService; |
| 15 | 15 |
| 16 class ExtensionManagementFunction : public SyncExtensionFunction { | 16 class ExtensionManagementFunction : public SyncExtensionFunction { |
| 17 protected: | 17 protected: |
| 18 ExtensionsService* service(); | 18 ExtensionsService* service(); |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 class GetAllExtensionsFunction : public ExtensionManagementFunction { | 21 class GetAllExtensionsFunction : public ExtensionManagementFunction { |
| 22 ~GetAllExtensionsFunction() {} | 22 ~GetAllExtensionsFunction() {} |
| 23 virtual bool RunImpl(); | 23 virtual bool RunImpl(); |
| 24 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.getAll"); | 24 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.getAll"); |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 class LaunchAppFunction : public ExtensionManagementFunction { |
| 28 ~LaunchAppFunction() {} |
| 29 virtual bool RunImpl(); |
| 30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.launchApp"); |
| 31 }; |
| 32 |
| 27 class SetEnabledFunction : public ExtensionManagementFunction { | 33 class SetEnabledFunction : public ExtensionManagementFunction { |
| 28 ~SetEnabledFunction() {} | 34 ~SetEnabledFunction() {} |
| 29 virtual bool RunImpl(); | 35 virtual bool RunImpl(); |
| 30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.setEnabled"); | 36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.setEnabled"); |
| 31 }; | 37 }; |
| 32 | 38 |
| 33 class UninstallFunction : public ExtensionManagementFunction { | 39 class UninstallFunction : public ExtensionManagementFunction { |
| 34 ~UninstallFunction() {} | 40 ~UninstallFunction() {} |
| 35 virtual bool RunImpl(); | 41 virtual bool RunImpl(); |
| 36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.uninstall"); | 42 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.uninstall"); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 54 virtual void Observe(NotificationType type, | 60 virtual void Observe(NotificationType type, |
| 55 const NotificationSource& source, | 61 const NotificationSource& source, |
| 56 const NotificationDetails& details); | 62 const NotificationDetails& details); |
| 57 | 63 |
| 58 NotificationRegistrar registrar_; | 64 NotificationRegistrar registrar_; |
| 59 | 65 |
| 60 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementEventRouter); | 66 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementEventRouter); |
| 61 }; | 67 }; |
| 62 | 68 |
| 63 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ | 69 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ |
| OLD | NEW |