Temporarily make lastchange use only the git hash.
[chromium-blink-merge.git] / ui / app_list / app_list_menu.h
blob6520e1d5904bea93882a6fab80e7be43bcbcbe07
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 #ifndef UI_APP_LIST_APP_LIST_MENU_H_
6 #define UI_APP_LIST_APP_LIST_MENU_H_
8 #include "ui/app_list/app_list_view_delegate.h"
9 #include "ui/base/models/simple_menu_model.h"
11 namespace app_list {
13 // Menu for the app list. This is shown in the top right hand corner of the
14 // app list.
15 // TODO(benwells): We should consider moving this into Chrome.
16 class AppListMenu : public ui::SimpleMenuModel::Delegate {
17 public:
18 enum AppListMenuCommands {
19 SHOW_SETTINGS,
20 SHOW_HELP,
21 SHOW_FEEDBACK,
22 // |SELECT_PROFILE| must remain the last enum because values greater than
23 // |SELECT_PROFILE| are used to indicate a profile index.
24 SELECT_PROFILE,
27 explicit AppListMenu(AppListViewDelegate* delegate);
28 virtual ~AppListMenu();
30 ui::SimpleMenuModel* menu_model() { return &menu_model_; }
32 private:
33 void InitMenu();
35 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
36 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
37 virtual bool GetAcceleratorForCommandId(
38 int command_id,
39 ui::Accelerator* accelerator) OVERRIDE;
40 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
42 ui::SimpleMenuModel menu_model_;
43 AppListViewDelegate* delegate_;
44 AppListViewDelegate::Users users_;
46 DISALLOW_COPY_AND_ASSIGN(AppListMenu);
49 } // namespace app_list
51 #endif // UI_APP_LIST_APP_LIST_MENU_H_