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

Unified Diff: chrome/browser/extensions/extension_action_manager.cc

Issue 489183005: Make a ShowExtensionActionPopup function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_action_manager.cc
diff --git a/chrome/browser/extensions/extension_action_manager.cc b/chrome/browser/extensions/extension_action_manager.cc
index ec26eb4c011eb38d9e11f2147abe998eee783630..bbfc93329b50ed3ce280da746717921a69d7efb0 100644
--- a/chrome/browser/extensions/extension_action_manager.cc
+++ b/chrome/browser/extensions/extension_action_manager.cc
@@ -100,8 +100,7 @@ void PopulateMissingValues(const Extension& extension,
if (action->default_icon())
*default_icon = *action->default_icon();
- const ExtensionIconSet& extension_icons =
- extensions::IconsInfo::GetIcons(&extension);
+ const ExtensionIconSet& extension_icons = IconsInfo::GetIcons(&extension);
std::string largest_icon = extension_icons.Get(
extension_misc::EXTENSION_ICON_GIGANTOR,
ExtensionIconSet::MATCH_SMALLER);
@@ -195,7 +194,7 @@ ExtensionAction* ExtensionActionManager::GetSystemIndicator(
// given profile. This could return NULL if the system indicator area is
// unavailable on the current system. If so, return NULL to signal that
// the system indicator area is unusable.
- if (!extensions::SystemIndicatorManagerFactory::GetForProfile(profile_))
+ if (!SystemIndicatorManagerFactory::GetForProfile(profile_))
return NULL;
return GetOrCreateOrNull(&system_indicators_, extension,
@@ -204,4 +203,10 @@ ExtensionAction* ExtensionActionManager::GetSystemIndicator(
profile_);
}
+ExtensionAction* ExtensionActionManager::GetExtensionAction(
+ const Extension& extension) const {
+ ExtensionAction* action = GetBrowserAction(extension);
+ return action ? action : GetPageAction(extension);
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698