| 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_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 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 // Gets the set of loaded app ids. Component apps are not included. | 611 // Gets the set of loaded app ids. Component apps are not included. |
| 612 extensions::ExtensionIdSet GetAppIds() const; | 612 extensions::ExtensionIdSet GetAppIds() const; |
| 613 | 613 |
| 614 // Record a histogram using the PermissionMessage enum values for each | 614 // Record a histogram using the PermissionMessage enum values for each |
| 615 // permission in |e|. | 615 // permission in |e|. |
| 616 // NOTE: If this is ever called with high frequency, the implementation may | 616 // NOTE: If this is ever called with high frequency, the implementation may |
| 617 // need to be made more efficient. | 617 // need to be made more efficient. |
| 618 static void RecordPermissionMessagesHistogram( | 618 static void RecordPermissionMessagesHistogram( |
| 619 const extensions::Extension* e, const char* histogram); | 619 const extensions::Extension* e, const char* histogram); |
| 620 | 620 |
| 621 // Open a dev tools window for the background page for the given extension, |
| 622 // starting the background page first if necesary. |
| 623 void InspectBackgroundPage(const extensions::Extension* extension); |
| 624 |
| 621 #if defined(UNIT_TEST) | 625 #if defined(UNIT_TEST) |
| 622 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { | 626 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { |
| 623 TrackTerminatedExtension(extension); | 627 TrackTerminatedExtension(extension); |
| 624 } | 628 } |
| 625 #endif | 629 #endif |
| 626 | 630 |
| 627 ExtensionWarningSet* extension_warnings() { | 631 ExtensionWarningSet* extension_warnings() { |
| 628 return &extension_warnings_; | 632 return &extension_warnings_; |
| 629 } | 633 } |
| 630 | 634 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 // a NaCl module to see those changes reflected in the PluginList. | 723 // a NaCl module to see those changes reflected in the PluginList. |
| 720 void UpdatePluginListWithNaClModules(); | 724 void UpdatePluginListWithNaClModules(); |
| 721 | 725 |
| 722 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); | 726 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); |
| 723 | 727 |
| 724 // Enqueues a launch task in the lazy background page queue. | 728 // Enqueues a launch task in the lazy background page queue. |
| 725 void QueueRestoreAppWindow(const extensions::Extension* extension); | 729 void QueueRestoreAppWindow(const extensions::Extension* extension); |
| 726 // Launches the platform app associated with |extension_host|. | 730 // Launches the platform app associated with |extension_host|. |
| 727 static void LaunchApplication(extensions::ExtensionHost* extension_host); | 731 static void LaunchApplication(extensions::ExtensionHost* extension_host); |
| 728 | 732 |
| 733 // Helper to inspect an ExtensionHost after it has been loaded. |
| 734 void InspectExtensionHost(extensions::ExtensionHost* host); |
| 735 |
| 729 // The normal profile associated with this ExtensionService. | 736 // The normal profile associated with this ExtensionService. |
| 730 Profile* profile_; | 737 Profile* profile_; |
| 731 | 738 |
| 732 // The ExtensionSystem for the profile above. | 739 // The ExtensionSystem for the profile above. |
| 733 extensions::ExtensionSystem* system_; | 740 extensions::ExtensionSystem* system_; |
| 734 | 741 |
| 735 // Preferences for the owning profile (weak reference). | 742 // Preferences for the owning profile (weak reference). |
| 736 extensions::ExtensionPrefs* extension_prefs_; | 743 extensions::ExtensionPrefs* extension_prefs_; |
| 737 | 744 |
| 738 // Settings for the owning profile. | 745 // Settings for the owning profile. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 #endif | 893 #endif |
| 887 | 894 |
| 888 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 895 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 889 InstallAppsWithUnlimtedStorage); | 896 InstallAppsWithUnlimtedStorage); |
| 890 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 897 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 891 InstallAppsAndCheckStorageProtection); | 898 InstallAppsAndCheckStorageProtection); |
| 892 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 899 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 893 }; | 900 }; |
| 894 | 901 |
| 895 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 902 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |