Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 10641017: make "reload" on chrome://extensions automatically relaunch running apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android compile Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698