OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/extensions/extension_menu_manager.h" | 27 #include "chrome/browser/extensions/extension_menu_manager.h" |
28 #include "chrome/browser/extensions/extension_prefs.h" | 28 #include "chrome/browser/extensions/extension_prefs.h" |
29 #include "chrome/browser/extensions/extension_permissions_api.h" | 29 #include "chrome/browser/extensions/extension_permissions_api.h" |
30 #include "chrome/browser/extensions/extension_process_manager.h" | 30 #include "chrome/browser/extensions/extension_process_manager.h" |
31 #include "chrome/browser/extensions/extension_toolbar_model.h" | 31 #include "chrome/browser/extensions/extension_toolbar_model.h" |
32 #include "chrome/browser/extensions/extensions_quota_service.h" | 32 #include "chrome/browser/extensions/extensions_quota_service.h" |
33 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 33 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
34 #include "chrome/browser/extensions/pending_extension_manager.h" | 34 #include "chrome/browser/extensions/pending_extension_manager.h" |
35 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 35 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
36 #include "chrome/browser/prefs/pref_change_registrar.h" | 36 #include "chrome/browser/prefs/pref_change_registrar.h" |
37 #include "chrome/common/extensions/extension.h" | 37 #include "chrome/common/extensions/extension_constants.h" |
38 #include "content/browser/browser_thread.h" | 38 #include "content/browser/browser_thread.h" |
39 #include "content/common/notification_observer.h" | 39 #include "content/common/notification_observer.h" |
40 #include "content/common/notification_registrar.h" | 40 #include "content/common/notification_registrar.h" |
41 #include "content/common/property_bag.h" | 41 #include "content/common/property_bag.h" |
42 | 42 |
43 class CrxInstaller; | 43 class CrxInstaller; |
44 class ExtensionBookmarkEventRouter; | 44 class ExtensionBookmarkEventRouter; |
45 class ExtensionBrowserEventRouter; | 45 class ExtensionBrowserEventRouter; |
46 class ExtensionContentSettingsStore; | 46 class ExtensionContentSettingsStore; |
47 class ExtensionCookiesEventRouter; | 47 class ExtensionCookiesEventRouter; |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 void UnloadComponentExtension(const ComponentExtensionInfo& info); | 351 void UnloadComponentExtension(const ComponentExtensionInfo& info); |
352 | 352 |
353 // Loads all known extensions (used by startup and testing code). | 353 // Loads all known extensions (used by startup and testing code). |
354 void LoadAllExtensions(); | 354 void LoadAllExtensions(); |
355 | 355 |
356 // Check for updates (or potentially new extensions from external providers) | 356 // Check for updates (or potentially new extensions from external providers) |
357 void CheckForExternalUpdates(); | 357 void CheckForExternalUpdates(); |
358 | 358 |
359 // Unload the specified extension. | 359 // Unload the specified extension. |
360 void UnloadExtension(const std::string& extension_id, | 360 void UnloadExtension(const std::string& extension_id, |
361 UnloadedExtensionInfo::Reason reason); | 361 extension_misc::UnloadedExtensionReason reason); |
362 | 362 |
363 // Unload all extensions. This is currently only called on shutdown, and | 363 // Unload all extensions. This is currently only called on shutdown, and |
364 // does not send notifications. | 364 // does not send notifications. |
365 void UnloadAllExtensions(); | 365 void UnloadAllExtensions(); |
366 | 366 |
367 // Called only by testing. | 367 // Called only by testing. |
368 void ReloadExtensions(); | 368 void ReloadExtensions(); |
369 | 369 |
370 // Scan the extension directory and clean up the cruft. | 370 // Scan the extension directory and clean up the cruft. |
371 void GarbageCollectExtensions(); | 371 void GarbageCollectExtensions(); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 // Removes the extension with the given id from the list of | 607 // Removes the extension with the given id from the list of |
608 // terminated extensions if it is there. | 608 // terminated extensions if it is there. |
609 void UntrackTerminatedExtension(const std::string& id); | 609 void UntrackTerminatedExtension(const std::string& id); |
610 | 610 |
611 // Handles sending notification that |extension| was loaded. | 611 // Handles sending notification that |extension| was loaded. |
612 void NotifyExtensionLoaded(const Extension* extension); | 612 void NotifyExtensionLoaded(const Extension* extension); |
613 | 613 |
614 // Handles sending notification that |extension| was unloaded. | 614 // Handles sending notification that |extension| was unloaded. |
615 void NotifyExtensionUnloaded(const Extension* extension, | 615 void NotifyExtensionUnloaded(const Extension* extension, |
616 UnloadedExtensionInfo::Reason reason); | 616 extension_misc::UnloadedExtensionReason reason); |
617 | 617 |
618 // Helper that updates the active extension list used for crash reporting. | 618 // Helper that updates the active extension list used for crash reporting. |
619 void UpdateActiveExtensionsInCrashReporter(); | 619 void UpdateActiveExtensionsInCrashReporter(); |
620 | 620 |
621 // Helper method. Loads extension from prefs. | 621 // Helper method. Loads extension from prefs. |
622 void LoadInstalledExtension(const ExtensionInfo& info, bool write_to_prefs); | 622 void LoadInstalledExtension(const ExtensionInfo& info, bool write_to_prefs); |
623 | 623 |
624 // We implement some Pepper plug-ins using NaCl to take advantage of NaCl's | 624 // We implement some Pepper plug-ins using NaCl to take advantage of NaCl's |
625 // strong sandbox. Typically, these NaCl modules are stored in extensions | 625 // strong sandbox. Typically, these NaCl modules are stored in extensions |
626 // and registered here. Not all NaCl modules need to register for a MIME | 626 // and registered here. Not all NaCl modules need to register for a MIME |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 NaClModuleInfoList nacl_module_list_; | 772 NaClModuleInfoList nacl_module_list_; |
773 | 773 |
774 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 774 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
775 InstallAppsWithUnlimtedStorage); | 775 InstallAppsWithUnlimtedStorage); |
776 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 776 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
777 InstallAppsAndCheckStorageProtection); | 777 InstallAppsAndCheckStorageProtection); |
778 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 778 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
779 }; | 779 }; |
780 | 780 |
781 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 781 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |