| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
| 17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 18 #include "base/memory/linked_ptr.h" | 18 #include "base/memory/linked_ptr.h" |
| 19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/property_bag.h" | 21 #include "base/property_bag.h" |
| 22 #include "base/string16.h" | 22 #include "base/string16.h" |
| 23 #include "base/time.h" | 23 #include "base/time.h" |
| 24 #include "base/tuple.h" | 24 #include "base/tuple.h" |
| 25 #include "chrome/browser/extensions/app_shortcut_manager.h" | 25 #include "chrome/browser/extensions/app_shortcut_manager.h" |
| 26 #include "chrome/browser/extensions/app_sync_bundle.h" | 26 #include "chrome/browser/extensions/app_sync_bundle.h" |
| 27 #include "chrome/browser/extensions/apps_promo.h" | |
| 28 #include "chrome/browser/extensions/extension_icon_manager.h" | 27 #include "chrome/browser/extensions/extension_icon_manager.h" |
| 29 #include "chrome/browser/extensions/extension_prefs.h" | 28 #include "chrome/browser/extensions/extension_prefs.h" |
| 30 #include "chrome/browser/extensions/extension_process_manager.h" | 29 #include "chrome/browser/extensions/extension_process_manager.h" |
| 31 #include "chrome/browser/extensions/extension_sync_bundle.h" | 30 #include "chrome/browser/extensions/extension_sync_bundle.h" |
| 32 #include "chrome/browser/extensions/extension_toolbar_model.h" | 31 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 33 #include "chrome/browser/extensions/extension_warning_set.h" | 32 #include "chrome/browser/extensions/extension_warning_set.h" |
| 34 #include "chrome/browser/extensions/extensions_quota_service.h" | 33 #include "chrome/browser/extensions/extensions_quota_service.h" |
| 35 #include "chrome/browser/extensions/external_provider_interface.h" | 34 #include "chrome/browser/extensions/external_provider_interface.h" |
| 36 #include "chrome/browser/extensions/menu_manager.h" | 35 #include "chrome/browser/extensions/menu_manager.h" |
| 37 #include "chrome/browser/extensions/pending_extension_manager.h" | 36 #include "chrome/browser/extensions/pending_extension_manager.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // Retuns a set of all installed, disabled, and terminated extensions and | 211 // Retuns a set of all installed, disabled, and terminated extensions and |
| 213 // transfers ownership to caller. | 212 // transfers ownership to caller. |
| 214 const ExtensionSet* GenerateInstalledExtensionsSet() const; | 213 const ExtensionSet* GenerateInstalledExtensionsSet() const; |
| 215 | 214 |
| 216 // Gets the object managing the set of pending extensions. | 215 // Gets the object managing the set of pending extensions. |
| 217 virtual extensions::PendingExtensionManager* | 216 virtual extensions::PendingExtensionManager* |
| 218 pending_extension_manager() OVERRIDE; | 217 pending_extension_manager() OVERRIDE; |
| 219 | 218 |
| 220 const FilePath& install_directory() const { return install_directory_; } | 219 const FilePath& install_directory() const { return install_directory_; } |
| 221 | 220 |
| 222 AppsPromo* apps_promo() { return &apps_promo_; } | |
| 223 | |
| 224 extensions::ProcessMap* process_map() { return &process_map_; } | 221 extensions::ProcessMap* process_map() { return &process_map_; } |
| 225 | 222 |
| 226 // Whether this extension can run in an incognito window. | 223 // Whether this extension can run in an incognito window. |
| 227 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; | 224 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; |
| 228 virtual void SetIsIncognitoEnabled(const std::string& extension_id, | 225 virtual void SetIsIncognitoEnabled(const std::string& extension_id, |
| 229 bool enabled); | 226 bool enabled); |
| 230 | 227 |
| 231 // When app notification setup is done, we call this to save the developer's | 228 // When app notification setup is done, we call this to save the developer's |
| 232 // oauth client id which we'll need at uninstall time to revoke the oauth | 229 // oauth client id which we'll need at uninstall time to revoke the oauth |
| 233 // permission grant for sending notifications. | 230 // permission grant for sending notifications. |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 // Keeps track of menu items added by extensions. | 789 // Keeps track of menu items added by extensions. |
| 793 extensions::MenuManager menu_manager_; | 790 extensions::MenuManager menu_manager_; |
| 794 | 791 |
| 795 // Keeps track of app notifications. | 792 // Keeps track of app notifications. |
| 796 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_; | 793 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_; |
| 797 | 794 |
| 798 // Keeps track of favicon-sized omnibox icons for extensions. | 795 // Keeps track of favicon-sized omnibox icons for extensions. |
| 799 ExtensionIconManager omnibox_icon_manager_; | 796 ExtensionIconManager omnibox_icon_manager_; |
| 800 ExtensionIconManager omnibox_popup_icon_manager_; | 797 ExtensionIconManager omnibox_popup_icon_manager_; |
| 801 | 798 |
| 802 // Manages the promotion of the web store. | |
| 803 AppsPromo apps_promo_; | |
| 804 | |
| 805 // Flag to make sure event routers are only initialized once. | 799 // Flag to make sure event routers are only initialized once. |
| 806 bool event_routers_initialized_; | 800 bool event_routers_initialized_; |
| 807 | 801 |
| 808 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; | 802 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; |
| 809 | 803 |
| 810 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; | 804 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; |
| 811 | 805 |
| 812 scoped_ptr<extensions::WindowEventRouter> window_event_router_; | 806 scoped_ptr<extensions::WindowEventRouter> window_event_router_; |
| 813 | 807 |
| 814 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; | 808 scoped_ptr<ExtensionPreferenceEventRouter> preference_event_router_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 scoped_ptr<ExtensionErrorUI> extension_error_ui_; | 856 scoped_ptr<ExtensionErrorUI> extension_error_ui_; |
| 863 | 857 |
| 864 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 858 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 865 InstallAppsWithUnlimtedStorage); | 859 InstallAppsWithUnlimtedStorage); |
| 866 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 860 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 867 InstallAppsAndCheckStorageProtection); | 861 InstallAppsAndCheckStorageProtection); |
| 868 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 862 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 869 }; | 863 }; |
| 870 | 864 |
| 871 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 865 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |