| 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/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/scoped_observer.h" | 13 #include "base/scoped_observer.h" |
| 14 #include "chrome/browser/extensions/api/commands/command_service.h" | 14 #include "chrome/browser/extensions/api/commands/command_service.h" |
| 15 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" | 15 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" |
| 16 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" | |
| 17 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 16 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
| 18 #include "chrome/browser/extensions/chrome_extension_function.h" | 17 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 19 #include "chrome/browser/extensions/error_console/error_console.h" | 18 #include "chrome/browser/extensions/error_console/error_console.h" |
| 20 #include "chrome/browser/extensions/extension_management.h" | 19 #include "chrome/browser/extensions/extension_management.h" |
| 21 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 20 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
| 22 #include "chrome/browser/extensions/pack_extension_job.h" | 21 #include "chrome/browser/extensions/pack_extension_job.h" |
| 23 #include "chrome/common/extensions/api/developer_private.h" | 22 #include "chrome/common/extensions/api/developer_private.h" |
| 24 #include "chrome/common/extensions/webstore_install_result.h" | 23 #include "chrome/common/extensions/webstore_install_result.h" |
| 25 #include "components/prefs/pref_change_registrar.h" | 24 #include "components/prefs/pref_change_registrar.h" |
| 26 #include "extensions/browser/app_window/app_window_registry.h" | 25 #include "extensions/browser/app_window/app_window_registry.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 | 47 |
| 49 class EntryPickerClient; | 48 class EntryPickerClient; |
| 50 | 49 |
| 51 } // namespace api | 50 } // namespace api |
| 52 | 51 |
| 53 class DeveloperPrivateEventRouter : public ExtensionRegistryObserver, | 52 class DeveloperPrivateEventRouter : public ExtensionRegistryObserver, |
| 54 public ErrorConsole::Observer, | 53 public ErrorConsole::Observer, |
| 55 public ProcessManagerObserver, | 54 public ProcessManagerObserver, |
| 56 public AppWindowRegistry::Observer, | 55 public AppWindowRegistry::Observer, |
| 57 public CommandService::Observer, | 56 public CommandService::Observer, |
| 58 public ExtensionActionAPI::Observer, | |
| 59 public ExtensionPrefsObserver, | 57 public ExtensionPrefsObserver, |
| 60 public ExtensionManagement::Observer, | 58 public ExtensionManagement::Observer, |
| 61 public WarningService::Observer { | 59 public WarningService::Observer { |
| 62 public: | 60 public: |
| 63 explicit DeveloperPrivateEventRouter(Profile* profile); | 61 explicit DeveloperPrivateEventRouter(Profile* profile); |
| 64 ~DeveloperPrivateEventRouter() override; | 62 ~DeveloperPrivateEventRouter() override; |
| 65 | 63 |
| 66 // Add or remove an ID to the list of extensions subscribed to events. | 64 // Add or remove an ID to the list of extensions subscribed to events. |
| 67 void AddExtensionId(const std::string& extension_id); | 65 void AddExtensionId(const std::string& extension_id); |
| 68 void RemoveExtensionId(const std::string& extension_id); | 66 void RemoveExtensionId(const std::string& extension_id); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 96 // AppWindowRegistry::Observer: | 94 // AppWindowRegistry::Observer: |
| 97 void OnAppWindowAdded(AppWindow* window) override; | 95 void OnAppWindowAdded(AppWindow* window) override; |
| 98 void OnAppWindowRemoved(AppWindow* window) override; | 96 void OnAppWindowRemoved(AppWindow* window) override; |
| 99 | 97 |
| 100 // CommandService::Observer: | 98 // CommandService::Observer: |
| 101 void OnExtensionCommandAdded(const std::string& extension_id, | 99 void OnExtensionCommandAdded(const std::string& extension_id, |
| 102 const Command& added_command) override; | 100 const Command& added_command) override; |
| 103 void OnExtensionCommandRemoved(const std::string& extension_id, | 101 void OnExtensionCommandRemoved(const std::string& extension_id, |
| 104 const Command& removed_command) override; | 102 const Command& removed_command) override; |
| 105 | 103 |
| 106 // ExtensionActionAPI::Observer: | |
| 107 void OnExtensionActionVisibilityChanged(const std::string& extension_id, | |
| 108 bool is_now_visible) override; | |
| 109 | |
| 110 // ExtensionPrefsObserver: | 104 // ExtensionPrefsObserver: |
| 111 void OnExtensionDisableReasonsChanged(const std::string& extension_id, | 105 void OnExtensionDisableReasonsChanged(const std::string& extension_id, |
| 112 int disable_reasons) override; | 106 int disable_reasons) override; |
| 113 | 107 |
| 114 // ExtensionManagement::Observer: | 108 // ExtensionManagement::Observer: |
| 115 void OnExtensionManagementSettingsChanged() override; | 109 void OnExtensionManagementSettingsChanged() override; |
| 116 | 110 |
| 117 // WarningService::Observer: | 111 // WarningService::Observer: |
| 118 void ExtensionWarningsChanged( | 112 void ExtensionWarningsChanged( |
| 119 const ExtensionIdSet& affected_extensions) override; | 113 const ExtensionIdSet& affected_extensions) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 130 std::unique_ptr<ExtensionInfoGenerator> info_generator, | 124 std::unique_ptr<ExtensionInfoGenerator> info_generator, |
| 131 std::vector<api::developer_private::ExtensionInfo> infos); | 125 std::vector<api::developer_private::ExtensionInfo> infos); |
| 132 | 126 |
| 133 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 127 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 134 extension_registry_observer_; | 128 extension_registry_observer_; |
| 135 ScopedObserver<ErrorConsole, ErrorConsole::Observer> error_console_observer_; | 129 ScopedObserver<ErrorConsole, ErrorConsole::Observer> error_console_observer_; |
| 136 ScopedObserver<ProcessManager, ProcessManagerObserver> | 130 ScopedObserver<ProcessManager, ProcessManagerObserver> |
| 137 process_manager_observer_; | 131 process_manager_observer_; |
| 138 ScopedObserver<AppWindowRegistry, AppWindowRegistry::Observer> | 132 ScopedObserver<AppWindowRegistry, AppWindowRegistry::Observer> |
| 139 app_window_registry_observer_; | 133 app_window_registry_observer_; |
| 140 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> | |
| 141 extension_action_api_observer_; | |
| 142 ScopedObserver<WarningService, WarningService::Observer> | 134 ScopedObserver<WarningService, WarningService::Observer> |
| 143 warning_service_observer_; | 135 warning_service_observer_; |
| 144 ScopedObserver<ExtensionPrefs, ExtensionPrefsObserver> | 136 ScopedObserver<ExtensionPrefs, ExtensionPrefsObserver> |
| 145 extension_prefs_observer_; | 137 extension_prefs_observer_; |
| 146 ScopedObserver<ExtensionManagement, ExtensionManagement::Observer> | 138 ScopedObserver<ExtensionManagement, ExtensionManagement::Observer> |
| 147 extension_management_observer_; | 139 extension_management_observer_; |
| 148 ScopedObserver<CommandService, CommandService::Observer> | 140 ScopedObserver<CommandService, CommandService::Observer> |
| 149 command_service_observer_; | 141 command_service_observer_; |
| 150 | 142 |
| 151 Profile* profile_; | 143 Profile* profile_; |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 protected: | 635 protected: |
| 644 ~DeveloperPrivateUpdateExtensionCommandFunction() override; | 636 ~DeveloperPrivateUpdateExtensionCommandFunction() override; |
| 645 ResponseAction Run() override; | 637 ResponseAction Run() override; |
| 646 }; | 638 }; |
| 647 | 639 |
| 648 } // namespace api | 640 } // namespace api |
| 649 | 641 |
| 650 } // namespace extensions | 642 } // namespace extensions |
| 651 | 643 |
| 652 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 644 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
| OLD | NEW |