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

Unified Diff: chrome/renderer/blocked_plugin.cc

Issue 6278013: Oops, fix my previous fix to the refactor breakage. Make sure we only apply... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/blocked_plugin.cc
===================================================================
--- chrome/renderer/blocked_plugin.cc (revision 72104)
+++ chrome/renderer/blocked_plugin.cc (working copy)
@@ -47,6 +47,8 @@
static const unsigned kMenuActionLoad = 1;
static const unsigned kMenuActionRemove = 2;
+static const BlockedPlugin* gLastActiveMenu;
+
BlockedPlugin::BlockedPlugin(RenderView* render_view,
WebFrame* frame,
const webkit::npapi::PluginGroup& info,
@@ -122,6 +124,7 @@
menu_data.customItems.swap(custom_items);
menu_data.mousePosition = WebPoint(event.windowX, event.windowY);
render_view()->showContextMenu(NULL, menu_data);
+ gLastActiveMenu = this;
}
bool BlockedPlugin::OnMessageReceived(const IPC::Message& message) {
@@ -129,7 +132,8 @@
// custom menu IDs, and not just our own. We don't swallow
// ViewMsg_LoadBlockedPlugins because multiple blocked plugins have an
// interest in it.
- if (message.type() == ViewMsg_CustomContextMenuAction::ID) {
+ if (message.type() == ViewMsg_CustomContextMenuAction::ID &&
+ gLastActiveMenu == this) {
ViewMsg_CustomContextMenuAction::Dispatch(
&message, this, this, &BlockedPlugin::OnMenuItemSelected);
} else if (message.type() == ViewMsg_LoadBlockedPlugins::ID) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698