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

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

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. 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/base/accelerators/accelerator.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return users_[command_id - SELECT_PROFILE].active; 66 return users_[command_id - SELECT_PROFILE].active;
67 #else 67 #else
68 return false; 68 return false;
69 #endif 69 #endif
70 } 70 }
71 71
72 bool AppListMenu::IsCommandIdEnabled(int command_id) const { 72 bool AppListMenu::IsCommandIdEnabled(int command_id) const {
73 return true; 73 return true;
74 } 74 }
75 75
76 bool AppListMenu::GetAcceleratorForCommandId(int command_id, 76 bool AppListMenu::GetAcceleratorForCommandId(
77 ui::Accelerator* accelerator) { 77 int command_id,
78 ui::Accelerator* accelerator) const {
78 return false; 79 return false;
79 } 80 }
80 81
81 void AppListMenu::ExecuteCommand(int command_id, int event_flags) { 82 void AppListMenu::ExecuteCommand(int command_id, int event_flags) {
82 if (command_id >= SELECT_PROFILE) { 83 if (command_id >= SELECT_PROFILE) {
83 delegate_->ShowForProfileByPath( 84 delegate_->ShowForProfileByPath(
84 users_[command_id - SELECT_PROFILE].profile_path); 85 users_[command_id - SELECT_PROFILE].profile_path);
85 return; 86 return;
86 } 87 }
87 switch (command_id) { 88 switch (command_id) {
88 case SHOW_SETTINGS: 89 case SHOW_SETTINGS:
89 delegate_->OpenSettings(); 90 delegate_->OpenSettings();
90 break; 91 break;
91 case SHOW_HELP: 92 case SHOW_HELP:
92 delegate_->OpenHelp(); 93 delegate_->OpenHelp();
93 break; 94 break;
94 case SHOW_FEEDBACK: 95 case SHOW_FEEDBACK:
95 delegate_->OpenFeedback(); 96 delegate_->OpenFeedback();
96 break; 97 break;
97 default: 98 default:
98 NOTREACHED(); 99 NOTREACHED();
99 } 100 }
100 } 101 }
101 102
102 } // namespace app_list 103 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_menu.h ('k') | ui/base/accelerators/accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698