| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // ExtensionFunction: | 107 // ExtensionFunction: |
| 108 bool RunSync() override; | 108 bool RunSync() override; |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 class ManagementSetEnabledFunction : public UIThreadExtensionFunction { | 111 class ManagementSetEnabledFunction : public UIThreadExtensionFunction { |
| 112 public: | 112 public: |
| 113 DECLARE_EXTENSION_FUNCTION("management.setEnabled", MANAGEMENT_SETENABLED) | 113 DECLARE_EXTENSION_FUNCTION("management.setEnabled", MANAGEMENT_SETENABLED) |
| 114 | 114 |
| 115 ManagementSetEnabledFunction(); | 115 ManagementSetEnabledFunction(); |
| 116 | 116 |
| 117 void InstallUIProceed(); | |
| 118 void InstallUIAbort(bool user_initiated); | |
| 119 | |
| 120 protected: | 117 protected: |
| 121 ~ManagementSetEnabledFunction() override; | 118 ~ManagementSetEnabledFunction() override; |
| 122 | 119 |
| 123 // ExtensionFunction: | 120 // ExtensionFunction: |
| 124 ResponseAction Run() override; | 121 ResponseAction Run() override; |
| 125 | 122 |
| 126 private: | 123 private: |
| 124 void OnInstallPromptDone(bool did_accept); |
| 125 |
| 127 void OnRequirementsChecked(const std::vector<std::string>& requirements); | 126 void OnRequirementsChecked(const std::vector<std::string>& requirements); |
| 128 | 127 |
| 129 std::string extension_id_; | 128 std::string extension_id_; |
| 130 | 129 |
| 131 scoped_ptr<InstallPromptDelegate> install_prompt_; | 130 scoped_ptr<InstallPromptDelegate> install_prompt_; |
| 132 | 131 |
| 133 scoped_ptr<RequirementsChecker> requirements_checker_; | 132 scoped_ptr<RequirementsChecker> requirements_checker_; |
| 134 }; | 133 }; |
| 135 | 134 |
| 136 class ManagementUninstallFunctionBase : public UIThreadExtensionFunction { | 135 class ManagementUninstallFunctionBase : public UIThreadExtensionFunction { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 scoped_ptr<ManagementEventRouter> management_event_router_; | 288 scoped_ptr<ManagementEventRouter> management_event_router_; |
| 290 | 289 |
| 291 scoped_ptr<ManagementAPIDelegate> delegate_; | 290 scoped_ptr<ManagementAPIDelegate> delegate_; |
| 292 | 291 |
| 293 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); | 292 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); |
| 294 }; | 293 }; |
| 295 | 294 |
| 296 } // namespace extensions | 295 } // namespace extensions |
| 297 | 296 |
| 298 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 297 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
| OLD | NEW |