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

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: 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 943
951 // Keeps track of loading and unloading component extensions. 944 // Keeps track of loading and unloading component extensions.
952 scoped_ptr<extensions::ComponentLoader> component_loader_; 945 scoped_ptr<extensions::ComponentLoader> component_loader_;
953 946
954 // Keeps track of menu items added by extensions. 947 // Keeps track of menu items added by extensions.
955 extensions::MenuManager menu_manager_; 948 extensions::MenuManager menu_manager_;
956 949
957 // Keeps track of app notifications. 950 // Keeps track of app notifications.
958 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_; 951 scoped_refptr<extensions::AppNotificationManager> app_notification_manager_;
959 952
960 // Keeps track of favicon-sized omnibox icons for extensions.
961 ExtensionIconManager omnibox_icon_manager_;
962 ExtensionIconManager omnibox_popup_icon_manager_;
963
964 // Flag to make sure event routers are only initialized once. 953 // Flag to make sure event routers are only initialized once.
965 bool event_routers_initialized_; 954 bool event_routers_initialized_;
966 955
967 // TODO(yoz): None of these should be owned by ExtensionService. 956 // TODO(yoz): None of these should be owned by ExtensionService.
968 // crbug.com/159265 957 // crbug.com/159265
969 scoped_ptr<HistoryExtensionEventRouter> history_event_router_; 958 scoped_ptr<HistoryExtensionEventRouter> history_event_router_;
970 959
971 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_; 960 scoped_ptr<extensions::BrowserEventRouter> browser_event_router_;
972 961
973 scoped_ptr<extensions::WindowEventRouter> window_event_router_; 962 scoped_ptr<extensions::WindowEventRouter> window_event_router_;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 #endif 1021 #endif
1033 1022
1034 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1023 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1035 InstallAppsWithUnlimtedStorage); 1024 InstallAppsWithUnlimtedStorage);
1036 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 1025 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
1037 InstallAppsAndCheckStorageProtection); 1026 InstallAppsAndCheckStorageProtection);
1038 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 1027 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
1039 }; 1028 };
1040 1029
1041 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 1030 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698