| 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 <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 // Called only by testing. | 351 // Called only by testing. |
| 352 void ReloadExtensions(); | 352 void ReloadExtensions(); |
| 353 | 353 |
| 354 // Scan the extension directory and clean up the cruft. | 354 // Scan the extension directory and clean up the cruft. |
| 355 void GarbageCollectExtensions(); | 355 void GarbageCollectExtensions(); |
| 356 | 356 |
| 357 // The App that represents the web store. | 357 // The App that represents the web store. |
| 358 const Extension* GetWebStoreApp(); | 358 const Extension* GetWebStoreApp(); |
| 359 | 359 |
| 360 // Lookup an extension by |url|. | |
| 361 const Extension* GetExtensionByURL(const GURL& url); | |
| 362 | |
| 363 // Returns the extension whose web extent contains |url|. | |
| 364 const Extension* GetExtensionByWebExtent(const GURL& url); | |
| 365 | |
| 366 // Returns the disabled extension whose web extent contains |url|. | |
| 367 const Extension* GetDisabledExtensionByWebExtent(const GURL& url); | |
| 368 | |
| 369 // Returns an extension that contains any URL that overlaps with the given | |
| 370 // extent, if one exists. | |
| 371 const Extension* GetExtensionByOverlappingWebExtent( | |
| 372 const URLPatternSet& extent); | |
| 373 | |
| 374 // Returns true if |url| should get extension api bindings and be permitted | 360 // Returns true if |url| should get extension api bindings and be permitted |
| 375 // to make api calls. Note that this is independent of what extension | 361 // to make api calls. Note that this is independent of what extension |
| 376 // permissions the given extension has been granted. | 362 // permissions the given extension has been granted. |
| 377 bool ExtensionBindingsAllowed(const GURL& url); | 363 bool ExtensionBindingsAllowed(const GURL& url); |
| 378 | 364 |
| 379 // Returns the icon to display in the omnibox for the given extension. | 365 // Returns the icon to display in the omnibox for the given extension. |
| 380 const SkBitmap& GetOmniboxIcon(const std::string& extension_id); | 366 const SkBitmap& GetOmniboxIcon(const std::string& extension_id); |
| 381 | 367 |
| 382 // Returns the icon to display in the omnibox popup window for the given | 368 // Returns the icon to display in the omnibox popup window for the given |
| 383 // extension. | 369 // extension. |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 ImageLoadingTracker tracker_; | 834 ImageLoadingTracker tracker_; |
| 849 | 835 |
| 850 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 836 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 851 InstallAppsWithUnlimtedStorage); | 837 InstallAppsWithUnlimtedStorage); |
| 852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 838 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 853 InstallAppsAndCheckStorageProtection); | 839 InstallAppsAndCheckStorageProtection); |
| 854 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 840 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 855 }; | 841 }; |
| 856 | 842 |
| 857 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 843 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |