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

Side by Side Diff: ui/app_list/cocoa/app_list_view_controller.mm

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 | « tools/gn/setup.cc ('k') | ui/app_list/views/app_list_main_view.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 #import "ui/app_list/cocoa/app_list_view_controller.h" 5 #import "ui/app_list/cocoa/app_list_view_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "skia/ext/skia_utils_mac.h" 10 #include "skia/ext/skia_utils_mac.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // Possibly handle grid navigation. 327 // Possibly handle grid navigation.
328 return [appsGridController_ handleCommandBySelector:command]; 328 return [appsGridController_ handleCommandBySelector:command];
329 } 329 }
330 330
331 - (void)modelTextDidChange { 331 - (void)modelTextDidChange {
332 app_list::SearchBoxModel* searchBoxModel = [self searchBoxModel]; 332 app_list::SearchBoxModel* searchBoxModel = [self searchBoxModel];
333 if (!searchBoxModel || !delegate_) 333 if (!searchBoxModel || !delegate_)
334 return; 334 return;
335 335
336 base::string16 query; 336 base::string16 query;
337 TrimWhitespace(searchBoxModel->text(), TRIM_ALL, &query); 337 base::TrimWhitespace(searchBoxModel->text(), base::TRIM_ALL, &query);
338 BOOL shouldShowSearch = !query.empty(); 338 BOOL shouldShowSearch = !query.empty();
339 [self revealSearchResults:shouldShowSearch]; 339 [self revealSearchResults:shouldShowSearch];
340 if (shouldShowSearch) 340 if (shouldShowSearch)
341 delegate_->StartSearch(); 341 delegate_->StartSearch();
342 else 342 else
343 delegate_->StopSearch(); 343 delegate_->StopSearch();
344 } 344 }
345 345
346 - (app_list::AppListModel*)appListModel { 346 - (app_list::AppListModel*)appListModel {
347 return [appsGridController_ model]; 347 return [appsGridController_ model];
(...skipping 26 matching lines...) Expand all
374 374
375 [backgroundView_ setHidden:YES]; 375 [backgroundView_ setHidden:YES];
376 signinViewController_.reset( 376 signinViewController_.reset(
377 [[SigninViewController alloc] initWithFrame:[backgroundView_ frame] 377 [[SigninViewController alloc] initWithFrame:[backgroundView_ frame]
378 cornerRadius:kBubbleCornerRadius 378 cornerRadius:kBubbleCornerRadius
379 delegate:signinDelegate]); 379 delegate:signinDelegate]);
380 [[self view] addSubview:[signinViewController_ view]]; 380 [[self view] addSubview:[signinViewController_ view]];
381 } 381 }
382 382
383 @end 383 @end
OLDNEW
« no previous file with comments | « tools/gn/setup.cc ('k') | ui/app_list/views/app_list_main_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698