| 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 SetEnabledFunction : public ExtensionManagementFunction { | 27 class SetEnabledFunction : public ExtensionManagementFunction { |
| 28 ~SetEnabledFunction() {} | 28 ~SetEnabledFunction() {} |
| 29 virtual bool RunImpl(); | 29 virtual bool RunImpl(); |
| 30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.setEnabled"); | 30 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.setEnabled"); |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 class InstallFunction : public ExtensionManagementFunction { | |
| 34 ~InstallFunction() {} | |
| 35 virtual bool RunImpl(); | |
| 36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.install"); | |
| 37 }; | |
| 38 | |
| 39 class UninstallFunction : public ExtensionManagementFunction { | 33 class UninstallFunction : public ExtensionManagementFunction { |
| 40 ~UninstallFunction() {} | 34 ~UninstallFunction() {} |
| 41 virtual bool RunImpl(); | 35 virtual bool RunImpl(); |
| 42 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.uninstall"); | 36 DECLARE_EXTENSION_FUNCTION_NAME("experimental.management.uninstall"); |
| 43 }; | 37 }; |
| 44 | 38 |
| 45 class ExtensionManagementEventRouter : public NotificationObserver { | 39 class ExtensionManagementEventRouter : public NotificationObserver { |
| 46 public: | 40 public: |
| 47 // Get the singleton instance of the event router. | 41 // Get the singleton instance of the event router. |
| 48 static ExtensionManagementEventRouter* GetInstance(); | 42 static ExtensionManagementEventRouter* GetInstance(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 60 virtual void Observe(NotificationType type, | 54 virtual void Observe(NotificationType type, |
| 61 const NotificationSource& source, | 55 const NotificationSource& source, |
| 62 const NotificationDetails& details); | 56 const NotificationDetails& details); |
| 63 | 57 |
| 64 NotificationRegistrar registrar_; | 58 NotificationRegistrar registrar_; |
| 65 | 59 |
| 66 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementEventRouter); | 60 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementEventRouter); |
| 67 }; | 61 }; |
| 68 | 62 |
| 69 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ | 63 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__ |
| OLD | NEW |