Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 11446034: SupportsUserData and manifest handlers for Extension; use them for the Omnibox API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + manifestdata Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 // Returns true if |url| should get extension api bindings and be permitted 422 // Returns true if |url| should get extension api bindings and be permitted
423 // to make api calls. Note that this is independent of what extension 423 // to make api calls. Note that this is independent of what extension
424 // permissions the given extension has been granted. 424 // permissions the given extension has been granted.
425 bool ExtensionBindingsAllowed(const GURL& url); 425 bool ExtensionBindingsAllowed(const GURL& url);
426 426
427 // Returns true if a normal browser window should avoid showing |url| in a 427 // Returns true if a normal browser window should avoid showing |url| in a
428 // tab. In this case, |url| is also rewritten to an error URL. 428 // tab. In this case, |url| is also rewritten to an error URL.
429 bool ShouldBlockUrlInBrowserTab(GURL* url); 429 bool ShouldBlockUrlInBrowserTab(GURL* url);
430 430
431 // Returns the icon to display in the omnibox for the given extension.
432 gfx::Image GetOmniboxIcon(const std::string& extension_id);
433
434 // Returns the icon to display in the omnibox popup window for the given
435 // extension.
436 gfx::Image GetOmniboxPopupIcon(const std::string& extension_id);
437
438 // Called when the initial extensions load has completed. 431 // Called when the initial extensions load has completed.
439 virtual void OnLoadedInstalledExtensions(); 432 virtual void OnLoadedInstalledExtensions();
440 433
441 // Adds |extension| to this ExtensionService and notifies observers than an 434 // Adds |extension| to this ExtensionService and notifies observers than an
442 // extension has been loaded. Called by the backend after an extension has 435 // extension has been loaded. Called by the backend after an extension has
443 // been loaded from a file and installed. 436 // been loaded from a file and installed.
444 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE; 437 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE;
445 438
446 // Check if we have preferences for the component extension and, if not or if 439 // Check if we have preferences for the component extension and, if not or if
447 // the stored version differs, install the extension (without requirements 440 // the stored version differs, install the extension (without requirements
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 958
966 // Keeps track of loading and unloading component extensions. 959 // Keeps track of loading and unloading component extensions.
967 scoped_ptr<extensions::ComponentLoader> component_loader_; 960 scoped_ptr<extensions::ComponentLoader> component_loader_;
968 961
969 // Keeps track of menu items added by extensions. 962 // Keeps track of menu items added by extensions.
970 extensions::MenuManager menu_manager_; 963 extensions::MenuManager menu_manager_;
971 964
972 // Keeps track of app notifications. 965 // Keeps track of app notifications.
973 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_; 966 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_;
974 967
975 // Keeps track of favicon-sized omnibox icons for extensions.
976 ExtensionIconManager omnibox_icon_manager_;
977 ExtensionIconManager omnibox_popup_icon_manager_;
978
979 // Flag to make sure event routers are only initialized once. 968 // Flag to make sure event routers are only initialized once.
980 bool event_routers_initialized_; 969 bool event_routers_initialized_;
981 970
982 // TODO(yoz): None of these should be owned by ExtensionService. 971 // TODO(yoz): None of these should be owned by ExtensionService.
983 // crbug.com/159265 972 // crbug.com/159265
984 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; 973 scoped_ptr<HistoryExtensionEventRouter> history_event_router_;
985 974
986 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; 975 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_;
987 976
988 scoped_ptr<extensions::WindowEventRouter> window_event_router_; 977 scoped_ptr<extensions::WindowEventRouter> window_event_router_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 #endif 1036 #endif
1048 1037
1049 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1038 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1050 InstallAppsWithUnlimtedStorage); 1039 InstallAppsWithUnlimtedStorage);
1051 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1040 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1052 InstallAppsAndCheckStorageProtection); 1041 InstallAppsAndCheckStorageProtection);
1053 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 1042 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1054 }; 1043 };
1055 1044
1056 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 1045 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_apitest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698