| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 class Profile; | 67 class Profile; |
| 68 class SyncData; | 68 class SyncData; |
| 69 class Version; | 69 class Version; |
| 70 | 70 |
| 71 namespace chromeos { | 71 namespace chromeos { |
| 72 class ExtensionInputMethodEventRouter; | 72 class ExtensionInputMethodEventRouter; |
| 73 } | 73 } |
| 74 | 74 |
| 75 namespace extensions { | 75 namespace extensions { |
| 76 class ComponentLoader; | 76 class ComponentLoader; |
| 77 class RulesRegistryService; |
| 77 class SettingsFrontend; | 78 class SettingsFrontend; |
| 78 class SocketController; | 79 class SocketController; |
| 79 } | 80 } |
| 80 | 81 |
| 81 // This is an interface class to encapsulate the dependencies that | 82 // This is an interface class to encapsulate the dependencies that |
| 82 // various classes have on ExtensionService. This allows easy mocking. | 83 // various classes have on ExtensionService. This allows easy mocking. |
| 83 class ExtensionServiceInterface : public SyncableService { | 84 class ExtensionServiceInterface : public SyncableService { |
| 84 public: | 85 public: |
| 85 // A function that returns true if the given extension should be | 86 // A function that returns true if the given extension should be |
| 86 // included and false if it should be filtered out. Identical to | 87 // included and false if it should be filtered out. Identical to |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 // Call only from IO thread. | 578 // Call only from IO thread. |
| 578 extensions::SocketController* socket_controller(); | 579 extensions::SocketController* socket_controller(); |
| 579 | 580 |
| 580 // Implement ImageLoadingTracker::Observer. |tracker_| is used to | 581 // Implement ImageLoadingTracker::Observer. |tracker_| is used to |
| 581 // load the application's icon, which is done when we start creating an | 582 // load the application's icon, which is done when we start creating an |
| 582 // application's shortcuts. This method receives the icon, and completes | 583 // application's shortcuts. This method receives the icon, and completes |
| 583 // the process of installing the shortcuts. | 584 // the process of installing the shortcuts. |
| 584 virtual void OnImageLoaded(SkBitmap* image, | 585 virtual void OnImageLoaded(SkBitmap* image, |
| 585 const ExtensionResource& resource, | 586 const ExtensionResource& resource, |
| 586 int index) OVERRIDE; | 587 int index) OVERRIDE; |
| 588 |
| 589 extensions::RulesRegistryService* GetRulesRegistryService(); |
| 590 |
| 587 private: | 591 private: |
| 588 // Bundle of type (app or extension)-specific sync stuff. | 592 // Bundle of type (app or extension)-specific sync stuff. |
| 589 struct SyncBundle { | 593 struct SyncBundle { |
| 590 SyncBundle(); | 594 SyncBundle(); |
| 591 ~SyncBundle(); | 595 ~SyncBundle(); |
| 592 | 596 |
| 593 bool HasExtensionId(const std::string& id) const; | 597 bool HasExtensionId(const std::string& id) const; |
| 594 bool HasPendingExtensionId(const std::string& id) const; | 598 bool HasPendingExtensionId(const std::string& id) const; |
| 595 | 599 |
| 596 ExtensionFilter filter; | 600 ExtensionFilter filter; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 scoped_ptr<ExtensionManagementEventRouter> management_event_router_; | 814 scoped_ptr<ExtensionManagementEventRouter> management_event_router_; |
| 811 | 815 |
| 812 scoped_ptr<ExtensionWebNavigationEventRouter> web_navigation_event_router_; | 816 scoped_ptr<ExtensionWebNavigationEventRouter> web_navigation_event_router_; |
| 813 | 817 |
| 814 #if defined(OS_CHROMEOS) | 818 #if defined(OS_CHROMEOS) |
| 815 scoped_ptr<ExtensionFileBrowserEventRouter> file_browser_event_router_; | 819 scoped_ptr<ExtensionFileBrowserEventRouter> file_browser_event_router_; |
| 816 scoped_ptr<chromeos::ExtensionInputMethodEventRouter> | 820 scoped_ptr<chromeos::ExtensionInputMethodEventRouter> |
| 817 input_method_event_router_; | 821 input_method_event_router_; |
| 818 #endif | 822 #endif |
| 819 | 823 |
| 824 scoped_ptr<extensions::RulesRegistryService> rules_registry_service_; |
| 825 |
| 820 // A collection of external extension providers. Each provider reads | 826 // A collection of external extension providers. Each provider reads |
| 821 // a source of external extension information. Examples include the | 827 // a source of external extension information. Examples include the |
| 822 // windows registry and external_extensions.json. | 828 // windows registry and external_extensions.json. |
| 823 ProviderCollection external_extension_providers_; | 829 ProviderCollection external_extension_providers_; |
| 824 | 830 |
| 825 // Set to true by OnExternalExtensionUpdateUrlFound() when an external | 831 // Set to true by OnExternalExtensionUpdateUrlFound() when an external |
| 826 // extension URL is found. Used in CheckForExternalUpdates() to see | 832 // extension URL is found. Used in CheckForExternalUpdates() to see |
| 827 // if an update check is needed to install pending extensions. | 833 // if an update check is needed to install pending extensions. |
| 828 bool external_extension_url_added_; | 834 bool external_extension_url_added_; |
| 829 | 835 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 848 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 854 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
| 849 | 855 |
| 850 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 851 InstallAppsWithUnlimtedStorage); | 857 InstallAppsWithUnlimtedStorage); |
| 852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 858 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 853 InstallAppsAndCheckStorageProtection); | 859 InstallAppsAndCheckStorageProtection); |
| 854 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 860 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 855 }; | 861 }; |
| 856 | 862 |
| 857 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 863 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |