| 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); | 784 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); |
| 785 | 785 |
| 786 // Performs tasks requested to occur after |extension| loads. | 786 // Performs tasks requested to occur after |extension| loads. |
| 787 void DoPostLoadTasks(const extensions::Extension* extension); | 787 void DoPostLoadTasks(const extensions::Extension* extension); |
| 788 | 788 |
| 789 // Launches the platform app associated with |extension_host|. | 789 // Launches the platform app associated with |extension_host|. |
| 790 static void LaunchApplication(extensions::ExtensionHost* extension_host); | 790 static void LaunchApplication(extensions::ExtensionHost* extension_host); |
| 791 | 791 |
| 792 // Dispatches a restart event to the platform app associated with | 792 // Dispatches a restart event to the platform app associated with |
| 793 // |extension_host|. | 793 // |extension_host|. |
| 794 static void RestartApplication(extensions::ExtensionHost* extension_host); | 794 static void RestartApplication( |
| 795 std::vector<extensions::app_file_handler_util::SavedFileEntry> |
| 796 file_entries, |
| 797 extensions::ExtensionHost* extension_host); |
| 795 | 798 |
| 796 // Helper to inspect an ExtensionHost after it has been loaded. | 799 // Helper to inspect an ExtensionHost after it has been loaded. |
| 797 void InspectExtensionHost(extensions::ExtensionHost* host); | 800 void InspectExtensionHost(extensions::ExtensionHost* host); |
| 798 | 801 |
| 799 // Helper to determine whether we should initially enable an installed | 802 // Helper to determine whether we should initially enable an installed |
| 800 // (or upgraded) extension. | 803 // (or upgraded) extension. |
| 801 bool ShouldEnableOnInstall(const extensions::Extension* extension); | 804 bool ShouldEnableOnInstall(const extensions::Extension* extension); |
| 802 | 805 |
| 803 // Helper to determine if an extension is idle, and it should be safe | 806 // Helper to determine if an extension is idle, and it should be safe |
| 804 // to update the extension. | 807 // to update the extension. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 | 915 |
| 913 // Map of inspector cookies that are detached, waiting for an extension to be | 916 // Map of inspector cookies that are detached, waiting for an extension to be |
| 914 // reloaded. | 917 // reloaded. |
| 915 typedef std::map<std::string, std::string> OrphanedDevTools; | 918 typedef std::map<std::string, std::string> OrphanedDevTools; |
| 916 OrphanedDevTools orphaned_dev_tools_; | 919 OrphanedDevTools orphaned_dev_tools_; |
| 917 | 920 |
| 918 // Maps extension ids to a bitmask that indicates which events should be | 921 // Maps extension ids to a bitmask that indicates which events should be |
| 919 // dispatched to the extension when it is loaded. | 922 // dispatched to the extension when it is loaded. |
| 920 std::map<std::string, int> on_load_events_; | 923 std::map<std::string, int> on_load_events_; |
| 921 | 924 |
| 925 // Maps extension ids to vectors of saved file entries that the extension |
| 926 // should be given access to on restart. |
| 927 typedef std::map<std::string, |
| 928 std::vector<extensions::app_file_handler_util::SavedFileEntry> > |
| 929 SavedFileEntryMap; |
| 930 SavedFileEntryMap on_restart_file_entries_; |
| 931 |
| 922 content::NotificationRegistrar registrar_; | 932 content::NotificationRegistrar registrar_; |
| 923 PrefChangeRegistrar pref_change_registrar_; | 933 PrefChangeRegistrar pref_change_registrar_; |
| 924 | 934 |
| 925 // Keeps track of loading and unloading component extensions. | 935 // Keeps track of loading and unloading component extensions. |
| 926 scoped_ptr<extensions::ComponentLoader> component_loader_; | 936 scoped_ptr<extensions::ComponentLoader> component_loader_; |
| 927 | 937 |
| 928 // Keeps track of menu items added by extensions. | 938 // Keeps track of menu items added by extensions. |
| 929 extensions::MenuManager menu_manager_; | 939 extensions::MenuManager menu_manager_; |
| 930 | 940 |
| 931 // Flag to make sure event routers are only initialized once. | 941 // Flag to make sure event routers are only initialized once. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 #endif | 991 #endif |
| 982 | 992 |
| 983 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 993 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 984 InstallAppsWithUnlimtedStorage); | 994 InstallAppsWithUnlimtedStorage); |
| 985 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 995 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 986 InstallAppsAndCheckStorageProtection); | 996 InstallAppsAndCheckStorageProtection); |
| 987 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 997 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 988 }; | 998 }; |
| 989 | 999 |
| 990 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 1000 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |