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

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

Issue 6291003: Revert 71485 - Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/search_engines/util.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 printable_selection_text)); 600 printable_selection_text));
601 } 601 }
602 } else { 602 } else {
603 const TemplateURL* const default_provider = 603 const TemplateURL* const default_provider =
604 profile_->GetTemplateURLModel()->GetDefaultSearchProvider(); 604 profile_->GetTemplateURLModel()->GetDefaultSearchProvider();
605 if (!default_provider) 605 if (!default_provider)
606 return; 606 return;
607 menu_model_.AddItem( 607 menu_model_.AddItem(
608 IDC_CONTENT_CONTEXT_SEARCHWEBFOR, 608 IDC_CONTENT_CONTEXT_SEARCHWEBFOR,
609 l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_SEARCHWEBFOR, 609 l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_SEARCHWEBFOR,
610 default_provider->short_name(), 610 WideToUTF16(default_provider->short_name()),
611 printable_selection_text)); 611 printable_selection_text));
612 } 612 }
613 } 613 }
614 614
615 void RenderViewContextMenu::AppendEditableItems() { 615 void RenderViewContextMenu::AppendEditableItems() {
616 // Append Dictionary spell check suggestions. 616 // Append Dictionary spell check suggestions.
617 for (size_t i = 0; i < params_.dictionary_suggestions.size() && 617 for (size_t i = 0; i < params_.dictionary_suggestions.size() &&
618 IDC_SPELLCHECK_SUGGESTION_0 + i <= IDC_SPELLCHECK_SUGGESTION_LAST; 618 IDC_SPELLCHECK_SUGGESTION_0 + i <= IDC_SPELLCHECK_SUGGESTION_LAST;
619 ++i) { 619 ++i) {
620 menu_model_.AddItem(IDC_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i), 620 menu_model_.AddItem(IDC_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i),
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1453 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1454 g_browser_process->clipboard()); 1454 g_browser_process->clipboard());
1455 } 1455 }
1456 1456
1457 void RenderViewContextMenu::MediaPlayerActionAt( 1457 void RenderViewContextMenu::MediaPlayerActionAt(
1458 const gfx::Point& location, 1458 const gfx::Point& location,
1459 const WebMediaPlayerAction& action) { 1459 const WebMediaPlayerAction& action) {
1460 source_tab_contents_->render_view_host()->MediaPlayerActionAt( 1460 source_tab_contents_->render_view_host()->MediaPlayerActionAt(
1461 location, action); 1461 location, action);
1462 } 1462 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/util.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698