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

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

Issue 2121303003: Remove the "Settings" packaged app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « ui/app_list/app_list_menu.h ('k') | ui/app_list/app_list_view_delegate.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/app_list/app_list_view_delegate.h" 10 #include "ui/app_list/app_list_view_delegate.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if (users_[i].active) { 43 if (users_[i].active) {
44 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 44 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
45 menu_model_.SetIcon(menu_index, gfx::Image(*rb.GetImageSkiaNamed( 45 menu_model_.SetIcon(menu_index, gfx::Image(*rb.GetImageSkiaNamed(
46 IDR_APP_LIST_USER_INDICATOR))); 46 IDR_APP_LIST_USER_INDICATOR)));
47 } 47 }
48 #endif 48 #endif
49 } 49 }
50 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); 50 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
51 } 51 }
52 52
53 menu_model_.AddItem(SHOW_SETTINGS, l10n_util::GetStringUTF16(
54 IDS_APP_LIST_OPEN_SETTINGS));
55
56 menu_model_.AddItem(SHOW_HELP, l10n_util::GetStringUTF16( 53 menu_model_.AddItem(SHOW_HELP, l10n_util::GetStringUTF16(
57 IDS_APP_LIST_HELP)); 54 IDS_APP_LIST_HELP));
58 55
59 menu_model_.AddItem(SHOW_FEEDBACK, l10n_util::GetStringUTF16( 56 menu_model_.AddItem(SHOW_FEEDBACK, l10n_util::GetStringUTF16(
60 IDS_APP_LIST_OPEN_FEEDBACK)); 57 IDS_APP_LIST_OPEN_FEEDBACK));
61 } 58 }
62 59
63 bool AppListMenu::IsCommandIdChecked(int command_id) const { 60 bool AppListMenu::IsCommandIdChecked(int command_id) const {
64 #if defined(OS_MACOSX) 61 #if defined(OS_MACOSX)
65 DCHECK_LT(static_cast<unsigned>(command_id) - SELECT_PROFILE, users_.size()); 62 DCHECK_LT(static_cast<unsigned>(command_id) - SELECT_PROFILE, users_.size());
(...skipping 12 matching lines...) Expand all
78 return false; 75 return false;
79 } 76 }
80 77
81 void AppListMenu::ExecuteCommand(int command_id, int event_flags) { 78 void AppListMenu::ExecuteCommand(int command_id, int event_flags) {
82 if (command_id >= SELECT_PROFILE) { 79 if (command_id >= SELECT_PROFILE) {
83 delegate_->ShowForProfileByPath( 80 delegate_->ShowForProfileByPath(
84 users_[command_id - SELECT_PROFILE].profile_path); 81 users_[command_id - SELECT_PROFILE].profile_path);
85 return; 82 return;
86 } 83 }
87 switch (command_id) { 84 switch (command_id) {
88 case SHOW_SETTINGS:
89 delegate_->OpenSettings();
90 break;
91 case SHOW_HELP: 85 case SHOW_HELP:
92 delegate_->OpenHelp(); 86 delegate_->OpenHelp();
93 break; 87 break;
94 case SHOW_FEEDBACK: 88 case SHOW_FEEDBACK:
95 delegate_->OpenFeedback(); 89 delegate_->OpenFeedback();
96 break; 90 break;
97 default: 91 default:
98 NOTREACHED(); 92 NOTREACHED();
99 } 93 }
100 } 94 }
101 95
102 } // namespace app_list 96 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_menu.h ('k') | ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698