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

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

Powered by Google App Engine
This is Rietveld 408576698