OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 our_params.custom_context.request_id = pending_context_menus_.Add(client); | 919 our_params.custom_context.request_id = pending_context_menus_.Add(client); |
920 Send(new FrameHostMsg_ContextMenu(routing_id_, our_params)); | 920 Send(new FrameHostMsg_ContextMenu(routing_id_, our_params)); |
921 return our_params.custom_context.request_id; | 921 return our_params.custom_context.request_id; |
922 } | 922 } |
923 | 923 |
924 void RenderFrameImpl::CancelContextMenu(int request_id) { | 924 void RenderFrameImpl::CancelContextMenu(int request_id) { |
925 DCHECK(pending_context_menus_.Lookup(request_id)); | 925 DCHECK(pending_context_menus_.Lookup(request_id)); |
926 pending_context_menus_.Remove(request_id); | 926 pending_context_menus_.Remove(request_id); |
927 } | 927 } |
928 | 928 |
| 929 blink::WebNode RenderFrameImpl::GetContextMenuNode() const { |
| 930 return render_view_->context_menu_node_; |
| 931 } |
| 932 |
929 blink::WebPlugin* RenderFrameImpl::CreatePlugin( | 933 blink::WebPlugin* RenderFrameImpl::CreatePlugin( |
930 blink::WebFrame* frame, | 934 blink::WebFrame* frame, |
931 const WebPluginInfo& info, | 935 const WebPluginInfo& info, |
932 const blink::WebPluginParams& params) { | 936 const blink::WebPluginParams& params) { |
933 DCHECK_EQ(frame_, frame); | 937 DCHECK_EQ(frame_, frame); |
934 #if defined(ENABLE_PLUGINS) | 938 #if defined(ENABLE_PLUGINS) |
935 bool pepper_plugin_was_registered = false; | 939 bool pepper_plugin_was_registered = false; |
936 scoped_refptr<PluginModule> pepper_module(PluginModule::Create( | 940 scoped_refptr<PluginModule> pepper_module(PluginModule::Create( |
937 this, info, &pepper_plugin_was_registered)); | 941 this, info, &pepper_plugin_was_registered)); |
938 if (pepper_plugin_was_registered) { | 942 if (pepper_plugin_was_registered) { |
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 policy == blink::WebNavigationPolicyNewForegroundTab || | 2675 policy == blink::WebNavigationPolicyNewForegroundTab || |
2672 policy == blink::WebNavigationPolicyNewWindow || | 2676 policy == blink::WebNavigationPolicyNewWindow || |
2673 policy == blink::WebNavigationPolicyNewPopup) { | 2677 policy == blink::WebNavigationPolicyNewPopup) { |
2674 WebUserGestureIndicator::consumeUserGesture(); | 2678 WebUserGestureIndicator::consumeUserGesture(); |
2675 } | 2679 } |
2676 | 2680 |
2677 Send(new FrameHostMsg_OpenURL(routing_id_, params)); | 2681 Send(new FrameHostMsg_OpenURL(routing_id_, params)); |
2678 } | 2682 } |
2679 | 2683 |
2680 } // namespace content | 2684 } // namespace content |
OLD | NEW |