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

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

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 if (profile_->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) && 998 if (profile_->GetPrefs()->GetBoolean(prefs::kPrintingEnabled) &&
999 (params_.media_type == WebContextMenuData::MediaTypeNone || 999 (params_.media_type == WebContextMenuData::MediaTypeNone ||
1000 params_.media_flags & WebContextMenuData::MediaCanPrint)) { 1000 params_.media_flags & WebContextMenuData::MediaCanPrint)) {
1001 menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT); 1001 menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
1002 } 1002 }
1003 } 1003 }
1004 1004
1005 void RenderViewContextMenu::AppendSearchProvider() { 1005 void RenderViewContextMenu::AppendSearchProvider() {
1006 DCHECK(profile_); 1006 DCHECK(profile_);
1007 1007
1008 TrimWhitespace(params_.selection_text, TRIM_ALL, &params_.selection_text); 1008 base::TrimWhitespace(params_.selection_text, base::TRIM_ALL,
1009 &params_.selection_text);
1009 if (params_.selection_text.empty()) 1010 if (params_.selection_text.empty())
1010 return; 1011 return;
1011 1012
1012 base::ReplaceChars(params_.selection_text, AutocompleteMatch::kInvalidChars, 1013 base::ReplaceChars(params_.selection_text, AutocompleteMatch::kInvalidChars,
1013 base::ASCIIToUTF16(" "), &params_.selection_text); 1014 base::ASCIIToUTF16(" "), &params_.selection_text);
1014 1015
1015 AutocompleteMatch match; 1016 AutocompleteMatch match;
1016 AutocompleteClassifierFactory::GetForProfile(profile_)->Classify( 1017 AutocompleteClassifierFactory::GetForProfile(profile_)->Classify(
1017 params_.selection_text, false, false, AutocompleteInput::INVALID_SPEC, 1018 params_.selection_text, false, false, AutocompleteInput::INVALID_SPEC,
1018 &match, NULL); 1019 &match, NULL);
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 source_web_contents_->GetRenderViewHost()-> 2112 source_web_contents_->GetRenderViewHost()->
2112 ExecuteMediaPlayerActionAtLocation(location, action); 2113 ExecuteMediaPlayerActionAtLocation(location, action);
2113 } 2114 }
2114 2115
2115 void RenderViewContextMenu::PluginActionAt( 2116 void RenderViewContextMenu::PluginActionAt(
2116 const gfx::Point& location, 2117 const gfx::Point& location,
2117 const WebPluginAction& action) { 2118 const WebPluginAction& action) {
2118 source_web_contents_->GetRenderViewHost()-> 2119 source_web_contents_->GetRenderViewHost()->
2119 ExecutePluginActionAtLocation(location, action); 2120 ExecutePluginActionAtLocation(location, action);
2120 } 2121 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_shortcut_manager_win.cc ('k') | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698