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

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

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove binary changes Created 7 years, 3 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
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/apps_grid_controller.h" 5 #import "ui/app_list/cocoa/apps_grid_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "ui/app_list/app_list_model.h" 8 #include "ui/app_list/app_list_model.h"
9 #include "ui/app_list/app_list_model_observer.h" 9 #include "ui/app_list/app_list_model_observer.h"
10 #include "ui/app_list/app_list_view_delegate.h" 10 #include "ui/app_list/app_list_view_delegate.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 model_->apps()->AddObserver(bridge_.get()); 207 model_->apps()->AddObserver(bridge_.get());
208 [self listItemsAdded:0 208 [self listItemsAdded:0
209 count:model_->apps()->item_count()]; 209 count:model_->apps()->item_count()];
210 } 210 }
211 211
212 - (void)setDelegate:(app_list::AppListViewDelegate*)newDelegate { 212 - (void)setDelegate:(app_list::AppListViewDelegate*)newDelegate {
213 scoped_ptr<app_list::AppListModel> newModel(new app_list::AppListModel); 213 scoped_ptr<app_list::AppListModel> newModel(new app_list::AppListModel);
214 delegate_ = newDelegate; 214 delegate_ = newDelegate;
215 if (delegate_) 215 if (delegate_)
216 delegate_->SetModel(newModel.get()); // Populates items. 216 delegate_->InitModel(newModel.get()); // Populates items.
217 [self setModel:newModel.Pass()]; 217 [self setModel:newModel.Pass()];
218 } 218 }
219 219
220 - (size_t)visiblePage { 220 - (size_t)visiblePage {
221 return visiblePage_; 221 return visiblePage_;
222 } 222 }
223 223
224 - (void)activateSelection { 224 - (void)activateSelection {
225 [[self selectedButton] performClick:self]; 225 [[self selectedButton] performClick:self];
226 } 226 }
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 return [self moveSelectionByDelta:-kItemsPerPage]; 670 return [self moveSelectionByDelta:-kItemsPerPage];
671 671
672 if (command == @selector(pageDown:) || 672 if (command == @selector(pageDown:) ||
673 command == @selector(scrollPageDown:)) 673 command == @selector(scrollPageDown:))
674 return [self moveSelectionByDelta:kItemsPerPage]; 674 return [self moveSelectionByDelta:kItemsPerPage];
675 675
676 return NO; 676 return NO;
677 } 677 }
678 678
679 @end 679 @end
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller.mm ('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