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

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: Apply CL to master (clean) 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 "skia/ext/skia_utils_mac.h" 8 #include "skia/ext/skia_utils_mac.h"
9 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 - (NSInteger)pagerSegmentAtLocation:(NSPoint)locationInWindow { 183 - (NSInteger)pagerSegmentAtLocation:(NSPoint)locationInWindow {
184 return [pagerControl_ findAndHighlightSegmentAtLocation:locationInWindow]; 184 return [pagerControl_ findAndHighlightSegmentAtLocation:locationInWindow];
185 } 185 }
186 186
187 - (app_list::SearchBoxModel*)searchBoxModel { 187 - (app_list::SearchBoxModel*)searchBoxModel {
188 app_list::AppListModel* appListModel = [appsGridController_ model]; 188 app_list::AppListModel* appListModel = [appsGridController_ model];
189 return appListModel ? appListModel->search_box() : NULL; 189 return appListModel ? appListModel->search_box() : NULL;
190 } 190 }
191 191
192 - (app_list::AppListViewDelegate*)appListDelegate {
193 return [self delegate];
194 }
195
192 - (BOOL)control:(NSControl*)control 196 - (BOOL)control:(NSControl*)control
193 textView:(NSTextView*)textView 197 textView:(NSTextView*)textView
194 doCommandBySelector:(SEL)command { 198 doCommandBySelector:(SEL)command {
195 // TODO(tapted): If showing search results, first pass up/down navigation to 199 // TODO(tapted): If showing search results, first pass up/down navigation to
196 // the search results controller. 200 // the search results controller.
197 201
198 // If anything has been written, let the search view handle it. 202 // If anything has been written, let the search view handle it.
199 if ([[control stringValue] length] > 0) 203 if ([[control stringValue] length] > 0)
200 return NO; 204 return NO;
201 205
(...skipping 14 matching lines...) Expand all
216 app_list::SearchBoxModel* searchBoxModel = [self searchBoxModel]; 220 app_list::SearchBoxModel* searchBoxModel = [self searchBoxModel];
217 if (!searchBoxModel || !delegate_) 221 if (!searchBoxModel || !delegate_)
218 return; 222 return;
219 223
220 // TODO(tapted): If there is a non-empty query in |searchBoxModel| reveal the 224 // TODO(tapted): If there is a non-empty query in |searchBoxModel| reveal the
221 // search results, and run delegate_->StartSearch(). Or, if the query is now 225 // search results, and run delegate_->StartSearch(). Or, if the query is now
222 // empty, hide results and run delegate_->StopSearch(). 226 // empty, hide results and run delegate_->StopSearch().
223 } 227 }
224 228
225 @end 229 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698