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

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

Issue 2068313002: [Extensions] Omit the "Inspect popup" menu item for synthesized actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_context_menu_model.cc
diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc
index 849956d55a34cd5cefcf1750030bfff08c7bb321..b5079f99b7a8ff81cfd0168db00b65baf9609a6d 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -348,8 +348,11 @@ void ExtensionContextMenuModel::InitMenu(const Extension* extension,
AddItemWithStringId(MANAGE, IDS_MANAGE_EXTENSION);
}
+ const ActionInfo* action_info = ActionInfo::GetPageActionInfo(extension);
+ if (!action_info)
+ action_info = ActionInfo::GetBrowserActionInfo(extension);
if (profile_->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode) &&
- delegate_ && !is_component_) {
+ delegate_ && !is_component_ && action_info && !action_info->synthesized) {
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringId(INSPECT_POPUP, IDS_EXTENSION_ACTION_INSPECT_POPUP);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698