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 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Whether the menu is currently visible to the user. | 60 // Whether the menu is currently visible to the user. |
61 bool IsShowing(); | 61 bool IsShowing(); |
62 | 62 |
63 bool for_drop() const { return (run_flags_ & FOR_DROP) != 0; } | 63 bool for_drop() const { return (run_flags_ & FOR_DROP) != 0; } |
64 | 64 |
65 void AddObserver(AppMenuObserver* observer); | 65 void AddObserver(AppMenuObserver* observer); |
66 void RemoveObserver(AppMenuObserver* observer); | 66 void RemoveObserver(AppMenuObserver* observer); |
67 | 67 |
68 // MenuDelegate overrides: | 68 // MenuDelegate overrides: |
69 const gfx::FontList* GetLabelFontList(int command_id) const override; | 69 const gfx::FontList* GetLabelFontList(int command_id) const override; |
70 bool GetShouldUseDisabledEmphasizedForegroundColor( | 70 bool GetShouldUseNormalForegroundColor(int command_id) const override; |
71 int command_id) const override; | |
72 base::string16 GetTooltipText(int command_id, | 71 base::string16 GetTooltipText(int command_id, |
73 const gfx::Point& p) const override; | 72 const gfx::Point& p) const override; |
74 bool IsTriggerableEvent(views::MenuItemView* menu, | 73 bool IsTriggerableEvent(views::MenuItemView* menu, |
75 const ui::Event& e) override; | 74 const ui::Event& e) override; |
76 bool GetDropFormats( | 75 bool GetDropFormats( |
77 views::MenuItemView* menu, | 76 views::MenuItemView* menu, |
78 int* formats, | 77 int* formats, |
79 std::set<ui::Clipboard::FormatType>* format_types) override; | 78 std::set<ui::Clipboard::FormatType>* format_types) override; |
80 bool AreDropTypesRequired(views::MenuItemView* menu) override; | 79 bool AreDropTypesRequired(views::MenuItemView* menu) override; |
81 bool CanDrop(views::MenuItemView* menu, | 80 bool CanDrop(views::MenuItemView* menu, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 200 |
202 base::ObserverList<AppMenuObserver> observer_list_; | 201 base::ObserverList<AppMenuObserver> observer_list_; |
203 | 202 |
204 // Records the time from when menu opens to when the user selects a menu item. | 203 // Records the time from when menu opens to when the user selects a menu item. |
205 base::ElapsedTimer menu_opened_timer_; | 204 base::ElapsedTimer menu_opened_timer_; |
206 | 205 |
207 DISALLOW_COPY_AND_ASSIGN(AppMenu); | 206 DISALLOW_COPY_AND_ASSIGN(AppMenu); |
208 }; | 207 }; |
209 | 208 |
210 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_H_ | 209 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_APP_MENU_H_ |
OLD | NEW |