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> |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 } | 463 } |
464 | 464 |
465 ExtensionBrowserEventRouter* browser_event_router() { | 465 ExtensionBrowserEventRouter* browser_event_router() { |
466 return browser_event_router_.get(); | 466 return browser_event_router_.get(); |
467 } | 467 } |
468 | 468 |
469 // Notify the frontend that there was an error loading an extension. | 469 // Notify the frontend that there was an error loading an extension. |
470 // This method is public because ExtensionServiceBackend can post to here. | 470 // This method is public because ExtensionServiceBackend can post to here. |
471 void ReportExtensionLoadError(const FilePath& extension_path, | 471 void ReportExtensionLoadError(const FilePath& extension_path, |
472 const std::string& error, | 472 const std::string& error, |
473 NotificationType type, | 473 int type, |
474 bool be_noisy); | 474 bool be_noisy); |
475 | 475 |
476 // ExtensionHost of background page calls this method right after its render | 476 // ExtensionHost of background page calls this method right after its render |
477 // view has been created. | 477 // view has been created. |
478 void DidCreateRenderViewForBackgroundPage(ExtensionHost* host); | 478 void DidCreateRenderViewForBackgroundPage(ExtensionHost* host); |
479 | 479 |
480 // For the extension in |version_path| with |id|, check to see if it's an | 480 // For the extension in |version_path| with |id|, check to see if it's an |
481 // externally managed extension. If so, uninstall it. | 481 // externally managed extension. If so, uninstall it. |
482 void CheckExternalUninstall(const std::string& id); | 482 void CheckExternalUninstall(const std::string& id); |
483 | 483 |
(...skipping 10 matching lines...) Expand all Loading... |
494 const FilePath& path, | 494 const FilePath& path, |
495 Extension::Location location); | 495 Extension::Location location); |
496 | 496 |
497 virtual void OnExternalExtensionUpdateUrlFound(const std::string& id, | 497 virtual void OnExternalExtensionUpdateUrlFound(const std::string& id, |
498 const GURL& update_url, | 498 const GURL& update_url, |
499 Extension::Location location); | 499 Extension::Location location); |
500 | 500 |
501 virtual void OnExternalProviderReady(); | 501 virtual void OnExternalProviderReady(); |
502 | 502 |
503 // NotificationObserver | 503 // NotificationObserver |
504 virtual void Observe(NotificationType type, | 504 virtual void Observe(int type, |
505 const NotificationSource& source, | 505 const NotificationSource& source, |
506 const NotificationDetails& details); | 506 const NotificationDetails& details); |
507 | 507 |
508 // Whether there are any apps installed. Component apps are not included. | 508 // Whether there are any apps installed. Component apps are not included. |
509 bool HasApps() const; | 509 bool HasApps() const; |
510 | 510 |
511 // Gets the set of loaded app ids. Component apps are not included. | 511 // Gets the set of loaded app ids. Component apps are not included. |
512 ExtensionIdSet GetAppIds() const; | 512 ExtensionIdSet GetAppIds() const; |
513 | 513 |
514 // Record a histogram using the PermissionMessage enum values for each | 514 // Record a histogram using the PermissionMessage enum values for each |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 653 |
654 // Whether to notify users when they attempt to install an extension. | 654 // Whether to notify users when they attempt to install an extension. |
655 bool show_extensions_prompts_; | 655 bool show_extensions_prompts_; |
656 | 656 |
657 // The backend that will do IO on behalf of this instance. | 657 // The backend that will do IO on behalf of this instance. |
658 scoped_refptr<ExtensionServiceBackend> backend_; | 658 scoped_refptr<ExtensionServiceBackend> backend_; |
659 | 659 |
660 // Used by dispatchers to limit API quota for individual extensions. | 660 // Used by dispatchers to limit API quota for individual extensions. |
661 ExtensionsQuotaService quota_service_; | 661 ExtensionsQuotaService quota_service_; |
662 | 662 |
663 // Record that Init() has been called, and NotificationType::EXTENSIONS_READY | 663 // Record that Init() has been called, and chrome::EXTENSIONS_READY |
664 // has fired. | 664 // has fired. |
665 bool ready_; | 665 bool ready_; |
666 | 666 |
667 // Our extension updater, if updates are turned on. | 667 // Our extension updater, if updates are turned on. |
668 scoped_ptr<ExtensionUpdater> updater_; | 668 scoped_ptr<ExtensionUpdater> updater_; |
669 | 669 |
670 // The model that tracks extensions with BrowserAction buttons. | 670 // The model that tracks extensions with BrowserAction buttons. |
671 ExtensionToolbarModel toolbar_model_; | 671 ExtensionToolbarModel toolbar_model_; |
672 | 672 |
673 // Map unloaded extensions' ids to their paths. When a temporarily loaded | 673 // Map unloaded extensions' ids to their paths. When a temporarily loaded |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 NaClModuleInfoList nacl_module_list_; | 737 NaClModuleInfoList nacl_module_list_; |
738 | 738 |
739 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 739 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
740 InstallAppsWithUnlimtedStorage); | 740 InstallAppsWithUnlimtedStorage); |
741 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 741 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
742 InstallAppsAndCheckStorageProtection); | 742 InstallAppsAndCheckStorageProtection); |
743 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 743 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
744 }; | 744 }; |
745 | 745 |
746 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 746 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |