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

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

Issue 14607023: Add support for persistent file access in apps. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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 <set> 10 #include <set>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 class BrowserEventRouter; 59 class BrowserEventRouter;
60 class ComponentLoader; 60 class ComponentLoader;
61 class ContentSettingsStore; 61 class ContentSettingsStore;
62 class CrxInstaller; 62 class CrxInstaller;
63 class ExtensionActionStorageManager; 63 class ExtensionActionStorageManager;
64 class ExtensionSyncData; 64 class ExtensionSyncData;
65 class ExtensionSystem; 65 class ExtensionSystem;
66 class ExtensionUpdater; 66 class ExtensionUpdater;
67 class PendingExtensionManager; 67 class PendingExtensionManager;
68 class SettingsFrontend; 68 class SettingsFrontend;
69
70 namespace app_file_handler_util {
71 struct SavedFileEntry;
72 }
73
74 } 69 }
75 70
76 namespace syncer { 71 namespace syncer {
77 class SyncErrorFactory; 72 class SyncErrorFactory;
78 } 73 }
79 74
80 // This is an interface class to encapsulate the dependencies that 75 // This is an interface class to encapsulate the dependencies that
81 // various classes have on ExtensionService. This allows easy mocking. 76 // various classes have on ExtensionService. This allows easy mocking.
82 class ExtensionServiceInterface : public syncer::SyncableService { 77 class ExtensionServiceInterface : public syncer::SyncableService {
83 public: 78 public:
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); 791 NaClModuleInfoList::iterator FindNaClModule(const GURL& url);
797 792
798 // Performs tasks requested to occur after |extension| loads. 793 // Performs tasks requested to occur after |extension| loads.
799 void DoPostLoadTasks(const extensions::Extension* extension); 794 void DoPostLoadTasks(const extensions::Extension* extension);
800 795
801 // Launches the platform app associated with |extension_host|. 796 // Launches the platform app associated with |extension_host|.
802 static void LaunchApplication(extensions::ExtensionHost* extension_host); 797 static void LaunchApplication(extensions::ExtensionHost* extension_host);
803 798
804 // Dispatches a restart event to the platform app associated with 799 // Dispatches a restart event to the platform app associated with
805 // |extension_host|. 800 // |extension_host|.
806 static void RestartApplication( 801 static void RestartApplication(extensions::ExtensionHost* extension_host);
807 std::vector<extensions::app_file_handler_util::SavedFileEntry>
808 file_entries,
809 extensions::ExtensionHost* extension_host);
810 802
811 // Helper to inspect an ExtensionHost after it has been loaded. 803 // Helper to inspect an ExtensionHost after it has been loaded.
812 void InspectExtensionHost(extensions::ExtensionHost* host); 804 void InspectExtensionHost(extensions::ExtensionHost* host);
813 805
814 // Helper to determine whether we should initially enable an installed 806 // Helper to determine whether we should initially enable an installed
815 // (or upgraded) extension. 807 // (or upgraded) extension.
816 bool ShouldEnableOnInstall(const extensions::Extension* extension); 808 bool ShouldEnableOnInstall(const extensions::Extension* extension);
817 809
818 // Helper to determine if an extension is idle, and it should be safe 810 // Helper to determine if an extension is idle, and it should be safe
819 // to update the extension. 811 // to update the extension.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 916
925 // Map of inspector cookies that are detached, waiting for an extension to be 917 // Map of inspector cookies that are detached, waiting for an extension to be
926 // reloaded. 918 // reloaded.
927 typedef std::map<std::string, std::string> OrphanedDevTools; 919 typedef std::map<std::string, std::string> OrphanedDevTools;
928 OrphanedDevTools orphaned_dev_tools_; 920 OrphanedDevTools orphaned_dev_tools_;
929 921
930 // Maps extension ids to a bitmask that indicates which events should be 922 // Maps extension ids to a bitmask that indicates which events should be
931 // dispatched to the extension when it is loaded. 923 // dispatched to the extension when it is loaded.
932 std::map<std::string, int> on_load_events_; 924 std::map<std::string, int> on_load_events_;
933 925
934 // Maps extension ids to vectors of saved file entries that the extension
935 // should be given access to on restart.
936 typedef std::map<std::string,
937 std::vector<extensions::app_file_handler_util::SavedFileEntry> >
938 SavedFileEntryMap;
939 SavedFileEntryMap on_restart_file_entries_;
940
941 content::NotificationRegistrar registrar_; 926 content::NotificationRegistrar registrar_;
942 PrefChangeRegistrar pref_change_registrar_; 927 PrefChangeRegistrar pref_change_registrar_;
943 928
944 // Keeps track of loading and unloading component extensions. 929 // Keeps track of loading and unloading component extensions.
945 scoped_ptr<extensions::ComponentLoader> component_loader_; 930 scoped_ptr<extensions::ComponentLoader> component_loader_;
946 931
947 // Keeps track of menu items added by extensions. 932 // Keeps track of menu items added by extensions.
948 extensions::MenuManager menu_manager_; 933 extensions::MenuManager menu_manager_;
949 934
950 // Flag to make sure event routers are only initialized once. 935 // Flag to make sure event routers are only initialized once.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 ObserverList<extensions::UpdateObserver, true> update_observers_; 986 ObserverList<extensions::UpdateObserver, true> update_observers_;
1002 987
1003 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 988 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1004 InstallAppsWithUnlimtedStorage); 989 InstallAppsWithUnlimtedStorage);
1005 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 990 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1006 InstallAppsAndCheckStorageProtection); 991 InstallAppsAndCheckStorageProtection);
1007 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 992 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1008 }; 993 };
1009 994
1010 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 995 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698