OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/common/shelf/shelf_menu_model.h" | 10 #include "ash/common/shelf/shelf_menu_model.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 explicit LauncherApplicationMenuItemModel( | 25 explicit LauncherApplicationMenuItemModel( |
26 ChromeLauncherAppMenuItems item_list); | 26 ChromeLauncherAppMenuItems item_list); |
27 ~LauncherApplicationMenuItemModel() override; | 27 ~LauncherApplicationMenuItemModel() override; |
28 | 28 |
29 // Overridden from ash::ShelfMenuModel: | 29 // Overridden from ash::ShelfMenuModel: |
30 bool IsCommandActive(int command_id) const override; | 30 bool IsCommandActive(int command_id) const override; |
31 | 31 |
32 // Overridden from ui::SimpleMenuModel::Delegate: | 32 // Overridden from ui::SimpleMenuModel::Delegate: |
33 bool IsCommandIdChecked(int command_id) const override; | 33 bool IsCommandIdChecked(int command_id) const override; |
34 bool IsCommandIdEnabled(int command_id) const override; | 34 bool IsCommandIdEnabled(int command_id) const override; |
35 bool GetAcceleratorForCommandId(int command_id, | |
36 ui::Accelerator* accelerator) const override; | |
37 void ExecuteCommand(int command_id, int event_flags) override; | 35 void ExecuteCommand(int command_id, int event_flags) override; |
38 | 36 |
39 private: | 37 private: |
40 friend class LauncherApplicationMenuItemModelTestAPI; | 38 friend class LauncherApplicationMenuItemModelTestAPI; |
41 | 39 |
42 void Build(); | 40 void Build(); |
43 | 41 |
44 // Returns the number of menu items that are enabled. | 42 // Returns the number of menu items that are enabled. |
45 int GetNumMenuItemsEnabled() const; | 43 int GetNumMenuItemsEnabled() const; |
46 | 44 |
47 // Records UMA metrics when a menu item is selected. | 45 // Records UMA metrics when a menu item is selected. |
48 void RecordMenuItemSelectedMetrics(int command_id, | 46 void RecordMenuItemSelectedMetrics(int command_id, |
49 int num_menu_items_enabled); | 47 int num_menu_items_enabled); |
50 | 48 |
51 // The list of menu items as returned from the launcher controller. | 49 // The list of menu items as returned from the launcher controller. |
52 ChromeLauncherAppMenuItems launcher_items_; | 50 ChromeLauncherAppMenuItems launcher_items_; |
53 | 51 |
54 DISALLOW_COPY_AND_ASSIGN(LauncherApplicationMenuItemModel); | 52 DISALLOW_COPY_AND_ASSIGN(LauncherApplicationMenuItemModel); |
55 }; | 53 }; |
56 | 54 |
57 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H
_ | 55 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H
_ |
OLD | NEW |