| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1932 | 1932 |
| 1933 // Controller functions -------------------------------------------------------- | 1933 // Controller functions -------------------------------------------------------- |
| 1934 | 1934 |
| 1935 void RenderViewContextMenu::OpenURL( | 1935 void RenderViewContextMenu::OpenURL( |
| 1936 const GURL& url, const GURL& referring_url, | 1936 const GURL& url, const GURL& referring_url, |
| 1937 WindowOpenDisposition disposition, | 1937 WindowOpenDisposition disposition, |
| 1938 content::PageTransition transition) { | 1938 content::PageTransition transition) { |
| 1939 content::Referrer referrer(referring_url.GetAsReferrer(), | 1939 content::Referrer referrer(referring_url.GetAsReferrer(), |
| 1940 params_.referrer_policy); | 1940 params_.referrer_policy); |
| 1941 | 1941 |
| 1942 if (params_.link_url == url && disposition != OFF_THE_RECORD) |
| 1943 params_.custom_context.link_followed = url; |
| 1944 |
| 1942 WebContents* new_contents = source_web_contents_->OpenURL(OpenURLParams( | 1945 WebContents* new_contents = source_web_contents_->OpenURL(OpenURLParams( |
| 1943 url, referrer, disposition, transition, false)); | 1946 url, referrer, disposition, transition, false)); |
| 1944 if (!new_contents) | 1947 if (!new_contents) |
| 1945 return; | 1948 return; |
| 1946 | 1949 |
| 1947 RetargetingDetails details; | 1950 RetargetingDetails details; |
| 1948 details.source_web_contents = source_web_contents_; | 1951 details.source_web_contents = source_web_contents_; |
| 1949 details.source_render_frame_id = render_frame_id_; | 1952 details.source_render_frame_id = render_frame_id_; |
| 1950 details.target_url = url; | 1953 details.target_url = url; |
| 1951 details.target_web_contents = new_contents; | 1954 details.target_web_contents = new_contents; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 source_web_contents_->GetRenderViewHost()-> | 1998 source_web_contents_->GetRenderViewHost()-> |
| 1996 ExecuteMediaPlayerActionAtLocation(location, action); | 1999 ExecuteMediaPlayerActionAtLocation(location, action); |
| 1997 } | 2000 } |
| 1998 | 2001 |
| 1999 void RenderViewContextMenu::PluginActionAt( | 2002 void RenderViewContextMenu::PluginActionAt( |
| 2000 const gfx::Point& location, | 2003 const gfx::Point& location, |
| 2001 const WebPluginAction& action) { | 2004 const WebPluginAction& action) { |
| 2002 source_web_contents_->GetRenderViewHost()-> | 2005 source_web_contents_->GetRenderViewHost()-> |
| 2003 ExecutePluginActionAtLocation(location, action); | 2006 ExecutePluginActionAtLocation(location, action); |
| 2004 } | 2007 } |
| OLD | NEW |