| OLD | NEW |
| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool AppListMenu::GetAcceleratorForCommandId( | |
| 74 int command_id, | |
| 75 ui::Accelerator* accelerator) const { | |
| 76 return false; | |
| 77 } | |
| 78 | |
| 79 void AppListMenu::ExecuteCommand(int command_id, int event_flags) { | 73 void AppListMenu::ExecuteCommand(int command_id, int event_flags) { |
| 80 if (command_id >= SELECT_PROFILE) { | 74 if (command_id >= SELECT_PROFILE) { |
| 81 delegate_->ShowForProfileByPath( | 75 delegate_->ShowForProfileByPath( |
| 82 users_[command_id - SELECT_PROFILE].profile_path); | 76 users_[command_id - SELECT_PROFILE].profile_path); |
| 83 return; | 77 return; |
| 84 } | 78 } |
| 85 switch (command_id) { | 79 switch (command_id) { |
| 86 case SHOW_HELP: | 80 case SHOW_HELP: |
| 87 delegate_->OpenHelp(); | 81 delegate_->OpenHelp(); |
| 88 break; | 82 break; |
| 89 case SHOW_FEEDBACK: | 83 case SHOW_FEEDBACK: |
| 90 delegate_->OpenFeedback(); | 84 delegate_->OpenFeedback(); |
| 91 break; | 85 break; |
| 92 default: | 86 default: |
| 93 NOTREACHED(); | 87 NOTREACHED(); |
| 94 } | 88 } |
| 95 } | 89 } |
| 96 | 90 |
| 97 } // namespace app_list | 91 } // namespace app_list |
| OLD | NEW |