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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 1772513002: Add frameId to contextMenus.onClicked / onclick. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 } 1647 }
1648 1648
1649 void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { 1649 void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
1650 RenderViewContextMenuBase::ExecuteCommand(id, event_flags); 1650 RenderViewContextMenuBase::ExecuteCommand(id, event_flags);
1651 if (command_executed_) 1651 if (command_executed_)
1652 return; 1652 return;
1653 command_executed_ = true; 1653 command_executed_ = true;
1654 1654
1655 // Process extension menu items. 1655 // Process extension menu items.
1656 if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) { 1656 if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) {
1657 extension_items_.ExecuteCommand(id, source_web_contents_, params_); 1657 extension_items_.ExecuteCommand(id, source_web_contents_,
1658 GetRenderFrameHost(), params_);
1658 return; 1659 return;
1659 } 1660 }
1660 1661
1661 if (id >= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST && 1662 if (id >= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST &&
1662 id <= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_LAST) { 1663 id <= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_LAST) {
1663 ProtocolHandlerRegistry::ProtocolHandlerList handlers = 1664 ProtocolHandlerRegistry::ProtocolHandlerList handlers =
1664 GetHandlersForLinkUrl(); 1665 GetHandlersForLinkUrl();
1665 if (handlers.empty()) 1666 if (handlers.empty())
1666 return; 1667 return;
1667 1668
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 source_web_contents_->GetRenderViewHost()-> 2207 source_web_contents_->GetRenderViewHost()->
2207 ExecuteMediaPlayerActionAtLocation(location, action); 2208 ExecuteMediaPlayerActionAtLocation(location, action);
2208 } 2209 }
2209 2210
2210 void RenderViewContextMenu::PluginActionAt( 2211 void RenderViewContextMenu::PluginActionAt(
2211 const gfx::Point& location, 2212 const gfx::Point& location,
2212 const WebPluginAction& action) { 2213 const WebPluginAction& action) {
2213 source_web_contents_->GetRenderViewHost()-> 2214 source_web_contents_->GetRenderViewHost()->
2214 ExecutePluginActionAtLocation(location, action); 2215 ExecutePluginActionAtLocation(location, action);
2215 } 2216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698