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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 381953002: New avatar button: Consolidate text elision between Mac and Win/Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use TruncateString 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 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698