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

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

Issue 9968076: Remove Inspect Popup command from browser actions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Views compile failure Created 8 years, 8 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_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 05707f2d3faf892d3e15f562d4c790fab781e51c..26324045e6e3dc1bc3d72e011f869bc3f5a5bdfa 100644
--- a/chrome/browser/extensions/extension_context_menu_model.cc
+++ b/chrome/browser/extensions/extension_context_menu_model.cc
@@ -30,30 +30,21 @@ enum MenuEntries {
HIDE,
DISABLE,
UNINSTALL,
- MANAGE,
- INSPECT_POPUP
+ MANAGE
};
ExtensionContextMenuModel::ExtensionContextMenuModel(
const Extension* extension,
- Browser* browser,
- PopupDelegate* delegate)
+ Browser* browser)
: ALLOW_THIS_IN_INITIALIZER_LIST(SimpleMenuModel(this)),
extension_id_(extension->id()),
browser_(browser),
- profile_(browser->profile()),
- delegate_(delegate) {
+ profile_(browser->profile()) {
extension_action_ = extension->browser_action();
if (!extension_action_)
extension_action_ = extension->page_action();
InitCommonCommands();
-
- if (profile_->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode) &&
- delegate_) {
- AddSeparator();
- AddItemWithStringId(INSPECT_POPUP, IDS_EXTENSION_ACTION_INSPECT_POPUP);
- }
}
ExtensionContextMenuModel::~ExtensionContextMenuModel() {
@@ -92,12 +83,6 @@ bool ExtensionContextMenuModel::IsCommandIdEnabled(int command_id) const {
// The NAME links to the Homepage URL. If the extension doesn't have a
// homepage, we just disable this menu item.
return extension->GetHomepageURL().is_valid();
- } else if (command_id == INSPECT_POPUP) {
- WebContents* contents = browser_->GetSelectedWebContents();
- if (!contents)
- return false;
-
- return extension_action_->HasPopup(ExtensionTabUtil::GetTabId(contents));
} else if (command_id == DISABLE || command_id == UNINSTALL) {
// Some extension types can not be disabled or uninstalled.
return Extension::UserMayDisable(extension->location());
@@ -150,10 +135,6 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id) {
browser_->ShowExtensionsTab();
break;
}
- case INSPECT_POPUP: {
- delegate_->InspectPopup(extension_action_);
- break;
- }
default:
NOTREACHED() << "Unknown option";
break;

Powered by Google App Engine
This is Rietveld 408576698