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 CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
11 #include "base/scoped_observer.h" | 11 #include "base/scoped_observer.h" |
12 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" | 12 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" |
13 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 13 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
14 #include "chrome/browser/extensions/chrome_extension_function.h" | 14 #include "chrome/browser/extensions/chrome_extension_function.h" |
15 #include "chrome/browser/extensions/error_console/error_console.h" | 15 #include "chrome/browser/extensions/error_console/error_console.h" |
16 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 16 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
17 #include "chrome/browser/extensions/pack_extension_job.h" | 17 #include "chrome/browser/extensions/pack_extension_job.h" |
| 18 #include "chrome/common/extensions/webstore_install_result.h" |
18 #include "extensions/browser/browser_context_keyed_api_factory.h" | 19 #include "extensions/browser/browser_context_keyed_api_factory.h" |
19 #include "extensions/browser/event_router.h" | 20 #include "extensions/browser/event_router.h" |
20 #include "extensions/browser/extension_registry_observer.h" | 21 #include "extensions/browser/extension_registry_observer.h" |
21 #include "extensions/browser/process_manager_observer.h" | 22 #include "extensions/browser/process_manager_observer.h" |
22 #include "storage/browser/fileapi/file_system_context.h" | 23 #include "storage/browser/fileapi/file_system_context.h" |
23 #include "storage/browser/fileapi/file_system_operation.h" | 24 #include "storage/browser/fileapi/file_system_operation.h" |
24 #include "ui/shell_dialogs/select_file_dialog.h" | 25 #include "ui/shell_dialogs/select_file_dialog.h" |
25 | 26 |
26 class Profile; | 27 class Profile; |
27 | 28 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 170 |
170 class DeveloperPrivateAPIFunction : public ChromeUIThreadExtensionFunction { | 171 class DeveloperPrivateAPIFunction : public ChromeUIThreadExtensionFunction { |
171 protected: | 172 protected: |
172 ~DeveloperPrivateAPIFunction() override; | 173 ~DeveloperPrivateAPIFunction() override; |
173 | 174 |
174 // Returns the extension with the given |id| from the registry, including | 175 // Returns the extension with the given |id| from the registry, including |
175 // all possible extensions (enabled, disabled, terminated, etc). | 176 // all possible extensions (enabled, disabled, terminated, etc). |
176 const Extension* GetExtensionById(const std::string& id); | 177 const Extension* GetExtensionById(const std::string& id); |
177 }; | 178 }; |
178 | 179 |
179 class DeveloperPrivateAutoUpdateFunction : public ChromeSyncExtensionFunction { | 180 class DeveloperPrivateAutoUpdateFunction : public DeveloperPrivateAPIFunction { |
180 public: | 181 public: |
181 DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate", | 182 DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate", |
182 DEVELOPERPRIVATE_AUTOUPDATE) | 183 DEVELOPERPRIVATE_AUTOUPDATE) |
183 | 184 |
184 protected: | 185 protected: |
185 ~DeveloperPrivateAutoUpdateFunction() override; | 186 ~DeveloperPrivateAutoUpdateFunction() override; |
186 | 187 ResponseAction Run() override; |
187 // ExtensionFunction: | |
188 bool RunSync() override; | |
189 }; | 188 }; |
190 | 189 |
191 class DeveloperPrivateGetItemsInfoFunction | 190 class DeveloperPrivateGetItemsInfoFunction |
192 : public DeveloperPrivateAPIFunction { | 191 : public DeveloperPrivateAPIFunction { |
193 public: | 192 public: |
194 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", | 193 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", |
195 DEVELOPERPRIVATE_GETITEMSINFO) | 194 DEVELOPERPRIVATE_GETITEMSINFO) |
196 DeveloperPrivateGetItemsInfoFunction(); | 195 DeveloperPrivateGetItemsInfoFunction(); |
197 | 196 |
198 private: | 197 private: |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 : public DeveloperPrivateAPIFunction { | 468 : public DeveloperPrivateAPIFunction { |
470 public: | 469 public: |
471 DECLARE_EXTENSION_FUNCTION("developerPrivate.deleteExtensionErrors", | 470 DECLARE_EXTENSION_FUNCTION("developerPrivate.deleteExtensionErrors", |
472 DEVELOPERPRIVATE_DELETEEXTENSIONERRORS); | 471 DEVELOPERPRIVATE_DELETEEXTENSIONERRORS); |
473 | 472 |
474 protected: | 473 protected: |
475 ~DeveloperPrivateDeleteExtensionErrorsFunction() override; | 474 ~DeveloperPrivateDeleteExtensionErrorsFunction() override; |
476 ResponseAction Run() override; | 475 ResponseAction Run() override; |
477 }; | 476 }; |
478 | 477 |
| 478 class DeveloperPrivateRepairExtensionFunction |
| 479 : public DeveloperPrivateAPIFunction { |
| 480 public: |
| 481 DECLARE_EXTENSION_FUNCTION("developerPrivate.repairExtension", |
| 482 DEVELOPERPRIVATE_REPAIREXTENSION); |
| 483 |
| 484 protected: |
| 485 ~DeveloperPrivateRepairExtensionFunction() override; |
| 486 ResponseAction Run() override; |
| 487 |
| 488 void OnReinstallComplete(bool success, |
| 489 const std::string& error, |
| 490 webstore_install::Result result); |
| 491 }; |
| 492 |
| 493 class DeveloperPrivateShowOptionsFunction : public DeveloperPrivateAPIFunction { |
| 494 public: |
| 495 DECLARE_EXTENSION_FUNCTION("developerPrivate.showOptions", |
| 496 DEVELOPERPRIVATE_SHOWOPTIONS); |
| 497 |
| 498 protected: |
| 499 ~DeveloperPrivateShowOptionsFunction() override; |
| 500 ResponseAction Run() override; |
| 501 }; |
| 502 |
| 503 class DeveloperPrivateShowPathFunction : public DeveloperPrivateAPIFunction { |
| 504 public: |
| 505 DECLARE_EXTENSION_FUNCTION("developerPrivate.showPath", |
| 506 DEVELOPERPRIVATE_SHOWPATH); |
| 507 |
| 508 protected: |
| 509 ~DeveloperPrivateShowPathFunction() override; |
| 510 ResponseAction Run() override; |
| 511 }; |
| 512 |
479 } // namespace api | 513 } // namespace api |
480 | 514 |
481 } // namespace extensions | 515 } // namespace extensions |
482 | 516 |
483 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 517 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
OLD | NEW |