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

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

Issue 15955003: Menu for the OSX app launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 years, 6 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 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/string_util.h" 8 #include "base/string_util.h"
9 #include "skia/ext/skia_utils_mac.h" 9 #include "skia/ext/skia_utils_mac.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 - (NSInteger)pagerSegmentAtLocation:(NSPoint)locationInWindow { 218 - (NSInteger)pagerSegmentAtLocation:(NSPoint)locationInWindow {
219 return [pagerControl_ findAndHighlightSegmentAtLocation:locationInWindow]; 219 return [pagerControl_ findAndHighlightSegmentAtLocation:locationInWindow];
220 } 220 }
221 221
222 - (app_list::SearchBoxModel*)searchBoxModel { 222 - (app_list::SearchBoxModel*)searchBoxModel {
223 app_list::AppListModel* appListModel = [appsGridController_ model]; 223 app_list::AppListModel* appListModel = [appsGridController_ model];
224 return appListModel ? appListModel->search_box() : NULL; 224 return appListModel ? appListModel->search_box() : NULL;
225 } 225 }
226 226
227 - (app_list::AppListViewDelegate*)appListDelegate {
228 return [self delegate];
229 }
230
227 - (BOOL)control:(NSControl*)control 231 - (BOOL)control:(NSControl*)control
228 textView:(NSTextView*)textView 232 textView:(NSTextView*)textView
229 doCommandBySelector:(SEL)command { 233 doCommandBySelector:(SEL)command {
230 if (showingSearchResults_) 234 if (showingSearchResults_)
231 return [appsSearchResultsController_ handleCommandBySelector:command]; 235 return [appsSearchResultsController_ handleCommandBySelector:command];
232 236
233 // If anything has been written, let the search view handle it. 237 // If anything has been written, let the search view handle it.
234 if ([[control stringValue] length] > 0) 238 if ([[control stringValue] length] > 0)
235 return NO; 239 return NO;
236 240
(...skipping 30 matching lines...) Expand all
267 } 271 }
268 272
269 - (void)openResult:(app_list::SearchResult*)result { 273 - (void)openResult:(app_list::SearchResult*)result {
270 if (delegate_) 274 if (delegate_)
271 delegate_->OpenSearchResult(result, 0 /* event flags */); 275 delegate_->OpenSearchResult(result, 0 /* event flags */);
272 276
273 [appsSearchBoxController_ clearSearch]; 277 [appsSearchBoxController_ clearSearch];
274 } 278 }
275 279
276 @end 280 @end
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller.h ('k') | ui/app_list/cocoa/apps_search_box_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698