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

Side by Side Diff: ui/app_list/app_list_menu.cc

Issue 63283003: Move AppListModel::Users to AppListViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac fixes Created 7 years, 1 month 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/app_list_menu.h ('k') | ui/app_list/app_list_model.h » ('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/app_list_menu.h" 5 #include "ui/app_list/app_list_menu.h"
6 6
7 #include "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "grit/ui_strings.h" 8 #include "grit/ui_strings.h"
9 #include "ui/app_list/app_list_view_delegate.h" 9 #include "ui/app_list/app_list_view_delegate.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/base/models/menu_separator_types.h" 11 #include "ui/base/models/menu_separator_types.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 13
14 namespace app_list { 14 namespace app_list {
15 15
16 AppListMenu::AppListMenu(AppListViewDelegate* delegate, 16 AppListMenu::AppListMenu(AppListViewDelegate* delegate)
17 const AppListModel::Users& users)
18 : menu_model_(this), 17 : menu_model_(this),
19 delegate_(delegate), 18 delegate_(delegate),
20 users_(users) { 19 users_(delegate->GetUsers()) {
21 InitMenu(); 20 InitMenu();
22 } 21 }
23 22
24 AppListMenu::~AppListMenu() {} 23 AppListMenu::~AppListMenu() {}
25 24
26 void AppListMenu::InitMenu() { 25 void AppListMenu::InitMenu() {
27 // User selector menu section. We don't show the user selector if there is 26 // User selector menu section. We don't show the user selector if there is
28 // only 1 user. 27 // only 1 user.
29 if (users_.size() > 1) { 28 if (users_.size() > 1) {
30 for (size_t i = 0; i < users_.size(); ++i) { 29 for (size_t i = 0; i < users_.size(); ++i) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 break; 90 break;
92 case SHOW_FEEDBACK: 91 case SHOW_FEEDBACK:
93 delegate_->OpenFeedback(); 92 delegate_->OpenFeedback();
94 break; 93 break;
95 default: 94 default:
96 NOTREACHED(); 95 NOTREACHED();
97 } 96 }
98 } 97 }
99 98
100 } // namespace app_list 99 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_menu.h ('k') | ui/app_list/app_list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698