| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 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/task.h" | 21 #include "base/task.h" |
| 22 #include "base/time.h" | 22 #include "base/time.h" |
| 23 #include "base/tuple.h" | 23 #include "base/tuple.h" |
| 24 #include "chrome/browser/extensions/apps_promo.h" | 24 #include "chrome/browser/extensions/apps_promo.h" |
| 25 #include "chrome/browser/extensions/extension_app_api.h" |
| 25 #include "chrome/browser/extensions/extension_icon_manager.h" | 26 #include "chrome/browser/extensions/extension_icon_manager.h" |
| 26 #include "chrome/browser/extensions/extension_menu_manager.h" | 27 #include "chrome/browser/extensions/extension_menu_manager.h" |
| 27 #include "chrome/browser/extensions/extension_prefs.h" | 28 #include "chrome/browser/extensions/extension_prefs.h" |
| 28 #include "chrome/browser/extensions/extension_process_manager.h" | 29 #include "chrome/browser/extensions/extension_process_manager.h" |
| 29 #include "chrome/browser/extensions/extension_toolbar_model.h" | 30 #include "chrome/browser/extensions/extension_toolbar_model.h" |
| 30 #include "chrome/browser/extensions/extensions_quota_service.h" | 31 #include "chrome/browser/extensions/extensions_quota_service.h" |
| 31 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 32 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
| 32 #include "chrome/browser/extensions/pending_extension_manager.h" | 33 #include "chrome/browser/extensions/pending_extension_manager.h" |
| 33 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" | 34 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
| 34 #include "chrome/browser/prefs/pref_change_registrar.h" | 35 #include "chrome/browser/prefs/pref_change_registrar.h" |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 446 |
| 446 // Note that this may return NULL if autoupdate is not turned on. | 447 // Note that this may return NULL if autoupdate is not turned on. |
| 447 ExtensionUpdater* updater(); | 448 ExtensionUpdater* updater(); |
| 448 | 449 |
| 449 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } | 450 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } |
| 450 | 451 |
| 451 ExtensionsQuotaService* quota_service() { return "a_service_; } | 452 ExtensionsQuotaService* quota_service() { return "a_service_; } |
| 452 | 453 |
| 453 ExtensionMenuManager* menu_manager() { return &menu_manager_; } | 454 ExtensionMenuManager* menu_manager() { return &menu_manager_; } |
| 454 | 455 |
| 456 AppNotificationManager* app_notification_manager() { |
| 457 return &app_notification_manager_; |
| 458 } |
| 459 |
| 455 ExtensionBrowserEventRouter* browser_event_router() { | 460 ExtensionBrowserEventRouter* browser_event_router() { |
| 456 return browser_event_router_.get(); | 461 return browser_event_router_.get(); |
| 457 } | 462 } |
| 458 | 463 |
| 459 // Notify the frontend that there was an error loading an extension. | 464 // Notify the frontend that there was an error loading an extension. |
| 460 // This method is public because ExtensionServiceBackend can post to here. | 465 // This method is public because ExtensionServiceBackend can post to here. |
| 461 void ReportExtensionLoadError(const FilePath& extension_path, | 466 void ReportExtensionLoadError(const FilePath& extension_path, |
| 462 const std::string& error, | 467 const std::string& error, |
| 463 NotificationType type, | 468 NotificationType type, |
| 464 bool be_noisy); | 469 bool be_noisy); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 // reloaded. | 681 // reloaded. |
| 677 typedef std::map<std::string, int> OrphanedDevTools; | 682 typedef std::map<std::string, int> OrphanedDevTools; |
| 678 OrphanedDevTools orphaned_dev_tools_; | 683 OrphanedDevTools orphaned_dev_tools_; |
| 679 | 684 |
| 680 NotificationRegistrar registrar_; | 685 NotificationRegistrar registrar_; |
| 681 PrefChangeRegistrar pref_change_registrar_; | 686 PrefChangeRegistrar pref_change_registrar_; |
| 682 | 687 |
| 683 // Keeps track of menu items added by extensions. | 688 // Keeps track of menu items added by extensions. |
| 684 ExtensionMenuManager menu_manager_; | 689 ExtensionMenuManager menu_manager_; |
| 685 | 690 |
| 691 // Keeps track of app notifications. |
| 692 AppNotificationManager app_notification_manager_; |
| 693 |
| 686 // Keeps track of favicon-sized omnibox icons for extensions. | 694 // Keeps track of favicon-sized omnibox icons for extensions. |
| 687 ExtensionIconManager omnibox_icon_manager_; | 695 ExtensionIconManager omnibox_icon_manager_; |
| 688 ExtensionIconManager omnibox_popup_icon_manager_; | 696 ExtensionIconManager omnibox_popup_icon_manager_; |
| 689 | 697 |
| 690 // List of registered component extensions (see Extension::Location). | 698 // List of registered component extensions (see Extension::Location). |
| 691 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | 699 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; |
| 692 RegisteredComponentExtensions component_extension_manifests_; | 700 RegisteredComponentExtensions component_extension_manifests_; |
| 693 | 701 |
| 694 // Manages the promotion of the web store. | 702 // Manages the promotion of the web store. |
| 695 AppsPromo apps_promo_; | 703 AppsPromo apps_promo_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 714 NaClModuleInfoList nacl_module_list_; | 722 NaClModuleInfoList nacl_module_list_; |
| 715 | 723 |
| 716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 724 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 717 InstallAppsWithUnlimtedStorage); | 725 InstallAppsWithUnlimtedStorage); |
| 718 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 726 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 719 InstallAppsAndCheckStorageProtection); | 727 InstallAppsAndCheckStorageProtection); |
| 720 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 728 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 721 }; | 729 }; |
| 722 | 730 |
| 723 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 731 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |