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

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

Issue 5742006: wstrings: make l10n_util::TruncateString use string16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "chrome/browser/tab_contents/render_view_context_menu.h" 8 #include "chrome/browser/tab_contents/render_view_context_menu.h"
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 // Don't enable the web inspector if the developer tools are disabled via 1423 // Don't enable the web inspector if the developer tools are disabled via
1424 // the preference dev-tools-disabled. 1424 // the preference dev-tools-disabled.
1425 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled)) 1425 if (profile_->GetPrefs()->GetBoolean(prefs::kDevToolsDisabled))
1426 return false; 1426 return false;
1427 } 1427 }
1428 1428
1429 return true; 1429 return true;
1430 } 1430 }
1431 1431
1432 string16 RenderViewContextMenu::PrintableSelectionText() { 1432 string16 RenderViewContextMenu::PrintableSelectionText() {
1433 return WideToUTF16(l10n_util::TruncateString(params_.selection_text, 1433 return l10n_util::TruncateString(WideToUTF16Hack(params_.selection_text),
1434 kMaxSelectionTextLength)); 1434 kMaxSelectionTextLength);
1435 } 1435 }
1436 1436
1437 // Controller functions -------------------------------------------------------- 1437 // Controller functions --------------------------------------------------------
1438 1438
1439 void RenderViewContextMenu::OpenURL( 1439 void RenderViewContextMenu::OpenURL(
1440 const GURL& url, 1440 const GURL& url,
1441 WindowOpenDisposition disposition, 1441 WindowOpenDisposition disposition,
1442 PageTransition::Type transition) { 1442 PageTransition::Type transition) {
1443 source_tab_contents_->OpenURL(url, GURL(), disposition, transition); 1443 source_tab_contents_->OpenURL(url, GURL(), disposition, transition);
1444 } 1444 }
(...skipping 15 matching lines...) Expand all
1460 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1460 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1461 g_browser_process->clipboard()); 1461 g_browser_process->clipboard());
1462 } 1462 }
1463 1463
1464 void RenderViewContextMenu::MediaPlayerActionAt( 1464 void RenderViewContextMenu::MediaPlayerActionAt(
1465 const gfx::Point& location, 1465 const gfx::Point& location,
1466 const WebMediaPlayerAction& action) { 1466 const WebMediaPlayerAction& action) {
1467 source_tab_contents_->render_view_host()->MediaPlayerActionAt( 1467 source_tab_contents_->render_view_host()->MediaPlayerActionAt(
1468 location, action); 1468 location, action);
1469 } 1469 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_gtk.cc ('k') | chrome/browser/ui/omnibox/location_bar_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698