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

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

Issue 214823012: Linux App Launcher: Show the profile selector on the hotdog menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exclude ChromeOS. 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 | « no previous file | ui/resources/ui_resources.grd » ('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"
(...skipping 14 matching lines...) Expand all
25 void AppListMenu::InitMenu() { 25 void AppListMenu::InitMenu() {
26 // 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
27 // only 1 user. 27 // only 1 user.
28 if (users_.size() > 1) { 28 if (users_.size() > 1) {
29 for (size_t i = 0; i < users_.size(); ++i) { 29 for (size_t i = 0; i < users_.size(); ++i) {
30 #if defined(OS_MACOSX) 30 #if defined(OS_MACOSX)
31 menu_model_.AddRadioItem(SELECT_PROFILE + i, 31 menu_model_.AddRadioItem(SELECT_PROFILE + i,
32 users_[i].email.empty() ? users_[i].name 32 users_[i].email.empty() ? users_[i].name
33 : users_[i].email, 33 : users_[i].email,
34 0 /* group_id */); 34 0 /* group_id */);
35 #elif defined(OS_WIN) 35 #elif defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
36 menu_model_.AddItem(SELECT_PROFILE + i, users_[i].name); 36 menu_model_.AddItem(SELECT_PROFILE + i, users_[i].name);
37 int menu_index = menu_model_.GetIndexOfCommandId(SELECT_PROFILE + i); 37 int menu_index = menu_model_.GetIndexOfCommandId(SELECT_PROFILE + i);
38 menu_model_.SetSublabel(menu_index, users_[i].email); 38 menu_model_.SetSublabel(menu_index, users_[i].email);
39 // Use custom check mark. 39 // Use custom check mark.
40 if (users_[i].active) { 40 if (users_[i].active) {
41 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 41 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
42 menu_model_.SetIcon(menu_index, gfx::Image(*rb.GetImageSkiaNamed( 42 menu_model_.SetIcon(menu_index, gfx::Image(*rb.GetImageSkiaNamed(
43 IDR_APP_LIST_USER_INDICATOR))); 43 IDR_APP_LIST_USER_INDICATOR)));
44 } 44 }
45 #endif 45 #endif
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 break; 90 break;
91 case SHOW_FEEDBACK: 91 case SHOW_FEEDBACK:
92 delegate_->OpenFeedback(); 92 delegate_->OpenFeedback();
93 break; 93 break;
94 default: 94 default:
95 NOTREACHED(); 95 NOTREACHED();
96 } 96 }
97 } 97 }
98 98
99 } // namespace app_list 99 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698