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" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "components/keyed_service/core/keyed_service.h" | 12 #include "components/keyed_service/core/keyed_service.h" |
13 #include "extensions/browser/api/management/management_api_delegate.h" | 13 #include "extensions/browser/api/management/management_api_delegate.h" |
| 14 #include "extensions/browser/preload_check.h" |
14 #include "extensions/browser/browser_context_keyed_api_factory.h" | 15 #include "extensions/browser/browser_context_keyed_api_factory.h" |
15 #include "extensions/browser/event_router.h" | 16 #include "extensions/browser/event_router.h" |
16 #include "extensions/browser/extension_event_histogram_value.h" | 17 #include "extensions/browser/extension_event_histogram_value.h" |
17 #include "extensions/browser/extension_function.h" | 18 #include "extensions/browser/extension_function.h" |
18 #include "extensions/browser/extension_registry_observer.h" | 19 #include "extensions/browser/extension_registry_observer.h" |
19 | 20 |
20 struct WebApplicationInfo; | 21 struct WebApplicationInfo; |
21 | 22 |
22 namespace extensions { | 23 namespace extensions { |
23 class ExtensionRegistry; | 24 class ExtensionRegistry; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 106 |
106 protected: | 107 protected: |
107 ~ManagementSetEnabledFunction() override; | 108 ~ManagementSetEnabledFunction() override; |
108 | 109 |
109 // ExtensionFunction: | 110 // ExtensionFunction: |
110 ResponseAction Run() override; | 111 ResponseAction Run() override; |
111 | 112 |
112 private: | 113 private: |
113 void OnInstallPromptDone(bool did_accept); | 114 void OnInstallPromptDone(bool did_accept); |
114 | 115 |
115 void OnRequirementsChecked(const std::vector<std::string>& requirements); | 116 void OnRequirementsChecked(PreloadCheck::Errors requirements_errors); |
116 | 117 |
117 std::string extension_id_; | 118 std::string extension_id_; |
118 | 119 |
119 std::unique_ptr<InstallPromptDelegate> install_prompt_; | 120 std::unique_ptr<InstallPromptDelegate> install_prompt_; |
120 | 121 |
121 std::unique_ptr<RequirementsChecker> requirements_checker_; | 122 std::unique_ptr<RequirementsChecker> requirements_checker_; |
122 }; | 123 }; |
123 | 124 |
124 class ManagementUninstallFunctionBase : public UIThreadExtensionFunction { | 125 class ManagementUninstallFunctionBase : public UIThreadExtensionFunction { |
125 public: | 126 public: |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 std::unique_ptr<ManagementEventRouter> management_event_router_; | 278 std::unique_ptr<ManagementEventRouter> management_event_router_; |
278 | 279 |
279 std::unique_ptr<ManagementAPIDelegate> delegate_; | 280 std::unique_ptr<ManagementAPIDelegate> delegate_; |
280 | 281 |
281 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); | 282 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); |
282 }; | 283 }; |
283 | 284 |
284 } // namespace extensions | 285 } // namespace extensions |
285 | 286 |
286 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ | 287 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ |
OLD | NEW |