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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.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 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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 1930
1931 // Controller functions -------------------------------------------------------- 1931 // Controller functions --------------------------------------------------------
1932 1932
1933 void RenderViewContextMenu::OpenURL( 1933 void RenderViewContextMenu::OpenURL(
1934 const GURL& url, const GURL& referring_url, 1934 const GURL& url, const GURL& referring_url,
1935 WindowOpenDisposition disposition, 1935 WindowOpenDisposition disposition,
1936 content::PageTransition transition) { 1936 content::PageTransition transition) {
1937 content::Referrer referrer(referring_url.GetAsReferrer(), 1937 content::Referrer referrer(referring_url.GetAsReferrer(),
1938 params_.referrer_policy); 1938 params_.referrer_policy);
1939 1939
1940 if (params_.link_url == url && disposition != OFF_THE_RECORD)
1941 params_.custom_context.link_followed = url;
Nate Chapin 2014/07/14 19:01:46 The meat of the change. We set link_followed in ce
1942
1940 WebContents* new_contents = source_web_contents_->OpenURL(OpenURLParams( 1943 WebContents* new_contents = source_web_contents_->OpenURL(OpenURLParams(
1941 url, referrer, disposition, transition, false)); 1944 url, referrer, disposition, transition, false));
1942 if (!new_contents) 1945 if (!new_contents)
1943 return; 1946 return;
1944 1947
1945 RetargetingDetails details; 1948 RetargetingDetails details;
1946 details.source_web_contents = source_web_contents_; 1949 details.source_web_contents = source_web_contents_;
1947 details.source_render_frame_id = render_frame_id_; 1950 details.source_render_frame_id = render_frame_id_;
1948 details.target_url = url; 1951 details.target_url = url;
1949 details.target_web_contents = new_contents; 1952 details.target_web_contents = new_contents;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 source_web_contents_->GetRenderViewHost()-> 1996 source_web_contents_->GetRenderViewHost()->
1994 ExecuteMediaPlayerActionAtLocation(location, action); 1997 ExecuteMediaPlayerActionAtLocation(location, action);
1995 } 1998 }
1996 1999
1997 void RenderViewContextMenu::PluginActionAt( 2000 void RenderViewContextMenu::PluginActionAt(
1998 const gfx::Point& location, 2001 const gfx::Point& location,
1999 const WebPluginAction& action) { 2002 const WebPluginAction& action) {
2000 source_web_contents_->GetRenderViewHost()-> 2003 source_web_contents_->GetRenderViewHost()->
2001 ExecutePluginActionAtLocation(location, action); 2004 ExecutePluginActionAtLocation(location, action);
2002 } 2005 }
OLDNEW
« no previous file with comments | « no previous file | content/common/frame_messages.h » ('j') | content/public/common/context_menu_params.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698