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

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: Peter's 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 125021af31aef9fa4812f993451e53fe8be5452e..14ab14145a16e6b91f071caf9c22ec4481b5c677 100644
--- a/chrome/browser/extensions/extension_action_manager.cc
+++ b/chrome/browser/extensions/extension_action_manager.cc
@@ -97,8 +97,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);
@@ -193,7 +192,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,
@@ -202,4 +201,10 @@ ExtensionAction* ExtensionActionManager::GetSystemIndicator(
profile_);
}
+ExtensionAction* ExtensionActionManager::GetExtensionAction(
+ const Extension& extension) const {
+ ExtensionAction* action = GetBrowserAction(extension);
+ return action ? action : GetPageAction(extension);
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/extension_action_manager.h ('k') | chrome/browser/extensions/extension_toolbar_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698