| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |