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 <string> | 10 #include <string> |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 // browser process. | 704 // browser process. |
705 void RegisterNaClModule(const GURL& url, const std::string& mime_type); | 705 void RegisterNaClModule(const GURL& url, const std::string& mime_type); |
706 void UnregisterNaClModule(const GURL& url); | 706 void UnregisterNaClModule(const GURL& url); |
707 | 707 |
708 // Call UpdatePluginListWithNaClModules() after registering or unregistering | 708 // Call UpdatePluginListWithNaClModules() after registering or unregistering |
709 // a NaCl module to see those changes reflected in the PluginList. | 709 // a NaCl module to see those changes reflected in the PluginList. |
710 void UpdatePluginListWithNaClModules(); | 710 void UpdatePluginListWithNaClModules(); |
711 | 711 |
712 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); | 712 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); |
713 | 713 |
| 714 // Enqueues a launch task in the lazy background page queue. |
| 715 void QueueRestoreAppWindow(const extensions::Extension* extension); |
| 716 // Launches the platform app associated with |extension_host|. |
| 717 static void LaunchApplication(extensions::ExtensionHost* extension_host); |
| 718 |
714 // The normal profile associated with this ExtensionService. | 719 // The normal profile associated with this ExtensionService. |
715 Profile* profile_; | 720 Profile* profile_; |
716 | 721 |
717 // The ExtensionSystem for the profile above. | 722 // The ExtensionSystem for the profile above. |
718 extensions::ExtensionSystem* system_; | 723 extensions::ExtensionSystem* system_; |
719 | 724 |
720 // Preferences for the owning profile (weak reference). | 725 // Preferences for the owning profile (weak reference). |
721 extensions::ExtensionPrefs* extension_prefs_; | 726 extensions::ExtensionPrefs* extension_prefs_; |
722 | 727 |
723 // Settings for the owning profile. | 728 // Settings for the owning profile. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 // extension is disabled before it is reloaded, keep track of the path so that | 781 // extension is disabled before it is reloaded, keep track of the path so that |
777 // it can be re-enabled upon a successful load. | 782 // it can be re-enabled upon a successful load. |
778 typedef std::map<std::string, FilePath> DisabledExtensionPathMap; | 783 typedef std::map<std::string, FilePath> DisabledExtensionPathMap; |
779 DisabledExtensionPathMap disabled_extension_paths_; | 784 DisabledExtensionPathMap disabled_extension_paths_; |
780 | 785 |
781 // Map of inspector cookies that are detached, waiting for an extension to be | 786 // Map of inspector cookies that are detached, waiting for an extension to be |
782 // reloaded. | 787 // reloaded. |
783 typedef std::map<std::string, int> OrphanedDevTools; | 788 typedef std::map<std::string, int> OrphanedDevTools; |
784 OrphanedDevTools orphaned_dev_tools_; | 789 OrphanedDevTools orphaned_dev_tools_; |
785 | 790 |
| 791 // A set of apps that had an open window the last time they were reloaded. |
| 792 // A new window will be launched when the app is succesfully reloaded. |
| 793 std::set<std::string> relaunch_app_ids_; |
| 794 |
786 content::NotificationRegistrar registrar_; | 795 content::NotificationRegistrar registrar_; |
787 PrefChangeRegistrar pref_change_registrar_; | 796 PrefChangeRegistrar pref_change_registrar_; |
788 | 797 |
789 // Keeps track of loading and unloading component extensions. | 798 // Keeps track of loading and unloading component extensions. |
790 scoped_ptr<extensions::ComponentLoader> component_loader_; | 799 scoped_ptr<extensions::ComponentLoader> component_loader_; |
791 | 800 |
792 // Keeps track of menu items added by extensions. | 801 // Keeps track of menu items added by extensions. |
793 extensions::MenuManager menu_manager_; | 802 extensions::MenuManager menu_manager_; |
794 | 803 |
795 // Keeps track of app notifications. | 804 // Keeps track of app notifications. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 #endif | 873 #endif |
865 | 874 |
866 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 875 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
867 InstallAppsWithUnlimtedStorage); | 876 InstallAppsWithUnlimtedStorage); |
868 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 877 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
869 InstallAppsAndCheckStorageProtection); | 878 InstallAppsAndCheckStorageProtection); |
870 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 879 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
871 }; | 880 }; |
872 | 881 |
873 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 882 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |