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

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

Issue 309443002: Remove need to sign in to use the App Launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile Created 6 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 #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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool AppListMenu::IsCommandIdChecked(int command_id) const { 60 bool AppListMenu::IsCommandIdChecked(int command_id) const {
61 #if defined(OS_MACOSX) 61 #if defined(OS_MACOSX)
62 DCHECK_LT(static_cast<unsigned>(command_id) - SELECT_PROFILE, users_.size()); 62 DCHECK_LT(static_cast<unsigned>(command_id) - SELECT_PROFILE, users_.size());
63 return users_[command_id - SELECT_PROFILE].active; 63 return users_[command_id - SELECT_PROFILE].active;
64 #else 64 #else
65 return false; 65 return false;
66 #endif 66 #endif
67 } 67 }
68 68
69 bool AppListMenu::IsCommandIdEnabled(int command_id) const { 69 bool AppListMenu::IsCommandIdEnabled(int command_id) const {
70 if (command_id >= SELECT_PROFILE &&
71 command_id < SELECT_PROFILE + static_cast<int>(users_.size())) {
72 return !users_[command_id - SELECT_PROFILE].signin_required;
73 }
74 return true; 70 return true;
75 } 71 }
76 72
77 bool AppListMenu::GetAcceleratorForCommandId(int command_id, 73 bool AppListMenu::GetAcceleratorForCommandId(int command_id,
78 ui::Accelerator* accelerator) { 74 ui::Accelerator* accelerator) {
79 return false; 75 return false;
80 } 76 }
81 77
82 void AppListMenu::ExecuteCommand(int command_id, int event_flags) { 78 void AppListMenu::ExecuteCommand(int command_id, int event_flags) {
83 if (command_id >= SELECT_PROFILE) { 79 if (command_id >= SELECT_PROFILE) {
(...skipping 10 matching lines...) Expand all
94 break; 90 break;
95 case SHOW_FEEDBACK: 91 case SHOW_FEEDBACK:
96 delegate_->OpenFeedback(); 92 delegate_->OpenFeedback();
97 break; 93 break;
98 default: 94 default:
99 NOTREACHED(); 95 NOTREACHED();
100 } 96 }
101 } 97 }
102 98
103 } // namespace app_list 99 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698