| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |