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

Side by Side Diff: ui/app_list/views/app_list_main_view.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
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller.mm ('k') | ui/base/clipboard/clipboard_util_win.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/views/app_list_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 void AppListMainView::GetShortcutPathForApp( 215 void AppListMainView::GetShortcutPathForApp(
216 const std::string& app_id, 216 const std::string& app_id,
217 const base::Callback<void(const base::FilePath&)>& callback) { 217 const base::Callback<void(const base::FilePath&)>& callback) {
218 delegate_->GetShortcutPathForApp(app_id, callback); 218 delegate_->GetShortcutPathForApp(app_id, callback);
219 } 219 }
220 220
221 void AppListMainView::QueryChanged(SearchBoxView* sender) { 221 void AppListMainView::QueryChanged(SearchBoxView* sender) {
222 base::string16 query; 222 base::string16 query;
223 TrimWhitespace(model_->search_box()->text(), TRIM_ALL, &query); 223 base::TrimWhitespace(model_->search_box()->text(), base::TRIM_ALL, &query);
224 bool should_show_search = !query.empty(); 224 bool should_show_search = !query.empty();
225 contents_view_->ShowSearchResults(should_show_search); 225 contents_view_->ShowSearchResults(should_show_search);
226 226
227 if (should_show_search) 227 if (should_show_search)
228 delegate_->StartSearch(); 228 delegate_->StartSearch();
229 else 229 else
230 delegate_->StopSearch(); 230 delegate_->StopSearch();
231 } 231 }
232 232
233 void AppListMainView::OpenResult(SearchResult* result, 233 void AppListMainView::OpenResult(SearchResult* result,
(...skipping 18 matching lines...) Expand all
252 // Resubmit the query via a posted task so that all observers for the 252 // Resubmit the query via a posted task so that all observers for the
253 // uninstall notification are notified. 253 // uninstall notification are notified.
254 base::MessageLoop::current()->PostTask( 254 base::MessageLoop::current()->PostTask(
255 FROM_HERE, 255 FROM_HERE,
256 base::Bind(&AppListMainView::QueryChanged, 256 base::Bind(&AppListMainView::QueryChanged,
257 weak_ptr_factory_.GetWeakPtr(), 257 weak_ptr_factory_.GetWeakPtr(),
258 search_box_view_)); 258 search_box_view_));
259 } 259 }
260 260
261 } // namespace app_list 261 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller.mm ('k') | ui/base/clipboard/clipboard_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698