| 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 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 // the preference dev-tools-disabled. | 1918 // the preference dev-tools-disabled. |
| 1919 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled)) | 1919 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled)) |
| 1920 return false; | 1920 return false; |
| 1921 } | 1921 } |
| 1922 | 1922 |
| 1923 return true; | 1923 return true; |
| 1924 } | 1924 } |
| 1925 | 1925 |
| 1926 base::string16 RenderViewContextMenu::PrintableSelectionText() { | 1926 base::string16 RenderViewContextMenu::PrintableSelectionText() { |
| 1927 return gfx::TruncateString(params_.selection_text, | 1927 return gfx::TruncateString(params_.selection_text, |
| 1928 kMaxSelectionTextLength); | 1928 kMaxSelectionTextLength, |
| 1929 true); |
| 1929 } | 1930 } |
| 1930 | 1931 |
| 1931 // Controller functions -------------------------------------------------------- | 1932 // Controller functions -------------------------------------------------------- |
| 1932 | 1933 |
| 1933 void RenderViewContextMenu::OpenURL( | 1934 void RenderViewContextMenu::OpenURL( |
| 1934 const GURL& url, const GURL& referring_url, | 1935 const GURL& url, const GURL& referring_url, |
| 1935 WindowOpenDisposition disposition, | 1936 WindowOpenDisposition disposition, |
| 1936 content::PageTransition transition) { | 1937 content::PageTransition transition) { |
| 1937 content::Referrer referrer(referring_url.GetAsReferrer(), | 1938 content::Referrer referrer(referring_url.GetAsReferrer(), |
| 1938 params_.referrer_policy); | 1939 params_.referrer_policy); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 source_web_contents_->GetRenderViewHost()-> | 1994 source_web_contents_->GetRenderViewHost()-> |
| 1994 ExecuteMediaPlayerActionAtLocation(location, action); | 1995 ExecuteMediaPlayerActionAtLocation(location, action); |
| 1995 } | 1996 } |
| 1996 | 1997 |
| 1997 void RenderViewContextMenu::PluginActionAt( | 1998 void RenderViewContextMenu::PluginActionAt( |
| 1998 const gfx::Point& location, | 1999 const gfx::Point& location, |
| 1999 const WebPluginAction& action) { | 2000 const WebPluginAction& action) { |
| 2000 source_web_contents_->GetRenderViewHost()-> | 2001 source_web_contents_->GetRenderViewHost()-> |
| 2001 ExecutePluginActionAtLocation(location, action); | 2002 ExecutePluginActionAtLocation(location, action); |
| 2002 } | 2003 } |
| OLD | NEW |