diff options
Diffstat (limited to 'chrome/browser/extensions/extensions_service.cc')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 9a91533..3259c11 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -186,6 +186,9 @@ ExtensionsService::ExtensionsService(Profile* profile, } backend_ = new ExtensionsServiceBackend(install_directory_); + + // Use monochrome icons for omnibox icons. + omnibox_icon_manager_.set_monochrome(true); } ExtensionsService::~ExtensionsService() { @@ -906,6 +909,11 @@ void ExtensionsService::OnExtensionLoaded(Extension* extension, if (profile_->GetTemplateURLModel()) profile_->GetTemplateURLModel()->RegisterExtensionKeyword(extension); + + // Load the icon for omnibox-enabled extensions so it will be ready to display + // in the URL bar. + if (!extension->omnibox_keyword().empty()) + omnibox_icon_manager_.LoadIcon(extension); } void ExtensionsService::UpdateActiveExtensionsInCrashReporter() { @@ -1029,6 +1037,11 @@ Extension* ExtensionsService::GetExtensionByOverlappingWebExtent( return NULL; } +const SkBitmap& ExtensionsService::GetOmniboxIcon( + const std::string& extension_id) { + return omnibox_icon_manager_.GetIcon(extension_id); +} + void ExtensionsService::ClearProvidersForTesting() { ChromeThread::PostTask( ChromeThread::FILE, FROM_HERE, |