gpu: Tweak Android WebGL test expectations
[chromium-blink-merge.git] / ui / app_list / app_list_menu.cc
blob95d6ac38d91b3acc2f6355b56a68e241dd00d953
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
3 // found in the LICENSE file.
5 #include "ui/app_list/app_list_menu.h"
7 #include "grit/ui_strings.h"
8 #include "ui/app_list/app_list_view_delegate.h"
9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/models/menu_separator_types.h"
11 #include "ui/base/resource/resource_bundle.h"
13 namespace app_list {
15 AppListMenu::AppListMenu(AppListViewDelegate* delegate)
16 : menu_model_(this),
17 delegate_(delegate) {
18 InitMenu();
21 AppListMenu::~AppListMenu() {}
23 void AppListMenu::InitMenu() {
24 menu_model_.AddItem(CURRENT_USER, base::string16());
25 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
27 menu_model_.AddItem(SHOW_SETTINGS, l10n_util::GetStringUTF16(
28 IDS_APP_LIST_OPEN_SETTINGS));
30 menu_model_.AddItem(SHOW_HELP, l10n_util::GetStringUTF16(
31 IDS_APP_LIST_HELP));
33 menu_model_.AddItem(SHOW_FEEDBACK, l10n_util::GetStringUTF16(
34 IDS_APP_LIST_OPEN_FEEDBACK));
37 bool AppListMenu::IsCommandIdChecked(int command_id) const {
38 return false;
41 bool AppListMenu::IsCommandIdEnabled(int command_id) const {
42 return true;
45 bool AppListMenu::GetAcceleratorForCommandId(int command_id,
46 ui::Accelerator* accelerator) {
47 return false;
50 void AppListMenu::ExecuteCommand(int command_id, int event_flags) {
51 switch (command_id) {
52 case CURRENT_USER:
53 break; // Do nothing.
54 case SHOW_SETTINGS:
55 delegate_->OpenSettings();
56 break;
57 case SHOW_HELP:
58 delegate_->OpenHelp();
59 break;
60 case SHOW_FEEDBACK:
61 delegate_->OpenFeedback();
62 break;
63 default:
64 NOTREACHED();
68 } // namespace app_list