Chromium Code Reviews| Index: ui/app_list/app_list_menu.h |
| diff --git a/ui/app_list/app_list_menu.h b/ui/app_list/app_list_menu.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1438a3236b4c732d78ae30ebd4743b1ed5d7e58e |
| --- /dev/null |
| +++ b/ui/app_list/app_list_menu.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_APP_LIST_APP_LIST_MENU_H_ |
| +#define UI_APP_LIST_APP_LIST_MENU_H_ |
| + |
| +#include "ui/base/models/simple_menu_model.h" |
| + |
| +namespace app_list { |
| + |
| +class AppListViewDelegate; |
| + |
| +class AppListMenu : ui::SimpleMenuModel::Delegate { |
|
tapted
2013/03/20 07:44:20
Should probably have a class comment
tapted
2013/03/20 07:44:20
Should this be AppListMenuModel ? It also seems co
benwells
2013/03/20 08:43:34
As I don't need to override anything in SimpleMenu
benwells
2013/03/20 08:43:34
Done.
|
| + public: |
| + enum AppListMenuCommands { |
| + CURRENT_USER, |
|
tapted
2013/03/20 07:44:20
It seems common to start these enums from 1 (small
benwells
2013/03/20 08:43:34
Done.
|
| + SHOW_SETTINGS, |
| + SHOW_FEEDBACK, |
| + }; |
| + |
| + explicit AppListMenu(AppListViewDelegate* delegate); |
| + virtual ~AppListMenu() {} |
|
tapted
2013/03/20 07:44:20
non-trivial destructor to .cc?
benwells
2013/03/20 08:43:34
Done.
|
| + |
| + protected: |
|
tapted
2013/03/20 07:44:20
private from here?
(I think non-private data memb
benwells
2013/03/20 08:43:34
Done.
|
| + ui::SimpleMenuModel menu_model_; |
| + AppListViewDelegate* delegate_; |
| + |
| + private: |
| + void InitMenu(); |
| + |
| + virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| + virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| + virtual bool GetAcceleratorForCommandId( |
| + int command_id, |
| + ui::Accelerator* accelerator) OVERRIDE; |
| + virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppListMenu); |
| +}; |
| + |
| +} // namespace app_list |
| + |
| +#endif // UI_APP_LIST_APP_LIST_MENU_H_ |