| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 // Called only by testing. | 348 // Called only by testing. |
| 349 void ReloadExtensions(); | 349 void ReloadExtensions(); |
| 350 | 350 |
| 351 // Scan the extension directory and clean up the cruft. | 351 // Scan the extension directory and clean up the cruft. |
| 352 void GarbageCollectExtensions(); | 352 void GarbageCollectExtensions(); |
| 353 | 353 |
| 354 // The App that represents the web store. | 354 // The App that represents the web store. |
| 355 const Extension* GetWebStoreApp(); | 355 const Extension* GetWebStoreApp(); |
| 356 | 356 |
| 357 // Lookup an extension by |url|. | |
| 358 const Extension* GetExtensionByURL(const GURL& url); | |
| 359 | |
| 360 // Returns the extension whose web extent contains |url|. | |
| 361 const Extension* GetExtensionByWebExtent(const GURL& url); | |
| 362 | |
| 363 // Returns the disabled extension whose web extent contains |url|. | |
| 364 const Extension* GetDisabledExtensionByWebExtent(const GURL& url); | |
| 365 | |
| 366 // Returns an extension that contains any URL that overlaps with the given | |
| 367 // extent, if one exists. | |
| 368 const Extension* GetExtensionByOverlappingWebExtent( | |
| 369 const URLPatternSet& extent); | |
| 370 | |
| 371 // Returns true if |url| should get extension api bindings and be permitted | 357 // Returns true if |url| should get extension api bindings and be permitted |
| 372 // to make api calls. Note that this is independent of what extension | 358 // to make api calls. Note that this is independent of what extension |
| 373 // permissions the given extension has been granted. | 359 // permissions the given extension has been granted. |
| 374 bool ExtensionBindingsAllowed(const GURL& url); | 360 bool ExtensionBindingsAllowed(const GURL& url); |
| 375 | 361 |
| 376 // Returns the icon to display in the omnibox for the given extension. | 362 // Returns the icon to display in the omnibox for the given extension. |
| 377 const SkBitmap& GetOmniboxIcon(const std::string& extension_id); | 363 const SkBitmap& GetOmniboxIcon(const std::string& extension_id); |
| 378 | 364 |
| 379 // Returns the icon to display in the omnibox popup window for the given | 365 // Returns the icon to display in the omnibox popup window for the given |
| 380 // extension. | 366 // extension. |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 extensions::ProcessMap process_map_; | 808 extensions::ProcessMap process_map_; |
| 823 | 809 |
| 824 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 810 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 825 InstallAppsWithUnlimtedStorage); | 811 InstallAppsWithUnlimtedStorage); |
| 826 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 812 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 827 InstallAppsAndCheckStorageProtection); | 813 InstallAppsAndCheckStorageProtection); |
| 828 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 814 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 829 }; | 815 }; |
| 830 | 816 |
| 831 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 817 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |