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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 384243004: Make <a ping> work for context menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 const CustomContextMenuContext& custom_context) { 1005 const CustomContextMenuContext& custom_context) {
1006 if (custom_context.request_id) { 1006 if (custom_context.request_id) {
1007 // External request, should be in our map. 1007 // External request, should be in our map.
1008 ContextMenuClient* client = 1008 ContextMenuClient* client =
1009 pending_context_menus_.Lookup(custom_context.request_id); 1009 pending_context_menus_.Lookup(custom_context.request_id);
1010 if (client) { 1010 if (client) {
1011 client->OnMenuClosed(custom_context.request_id); 1011 client->OnMenuClosed(custom_context.request_id);
1012 pending_context_menus_.Remove(custom_context.request_id); 1012 pending_context_menus_.Remove(custom_context.request_id);
1013 } 1013 }
1014 } else { 1014 } else {
1015 if (custom_context.link_followed.is_valid()) {
1016 frame_->sendPings(
1017 ContextMenuParamsBuilder::extractParentAnchorNode(
darin (slow to review) 2014/07/22 17:34:40 maybe we should just have a dom_utils.{h,cc} in co
Nate Chapin 2014/07/22 18:19:56 Agree. dom_utils.{h,cc} seems like a reasonable na
1018 context_menu_node_),
1019 custom_context.link_followed);
1020 }
1015 // Internal request, forward to WebKit. 1021 // Internal request, forward to WebKit.
1016 context_menu_node_.reset(); 1022 context_menu_node_.reset();
1017 } 1023 }
1018 } 1024 }
1019 1025
1020 void RenderFrameImpl::OnCustomContextMenuAction( 1026 void RenderFrameImpl::OnCustomContextMenuAction(
1021 const CustomContextMenuContext& custom_context, 1027 const CustomContextMenuContext& custom_context,
1022 unsigned action) { 1028 unsigned action) {
1023 if (custom_context.request_id) { 1029 if (custom_context.request_id) {
1024 // External context menu request, look in our map. 1030 // External context menu request, look in our map.
(...skipping 2554 matching lines...) Expand 10 before | Expand all | Expand 10 after
3579 3585
3580 #if defined(ENABLE_BROWSER_CDMS) 3586 #if defined(ENABLE_BROWSER_CDMS)
3581 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3587 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3582 if (!cdm_manager_) 3588 if (!cdm_manager_)
3583 cdm_manager_ = new RendererCdmManager(this); 3589 cdm_manager_ = new RendererCdmManager(this);
3584 return cdm_manager_; 3590 return cdm_manager_;
3585 } 3591 }
3586 #endif // defined(ENABLE_BROWSER_CDMS) 3592 #endif // defined(ENABLE_BROWSER_CDMS)
3587 3593
3588 } // namespace content 3594 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698