OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_VIEWS_MENU_BUTTON_H__ | 5 #ifndef CHROME_VIEWS_MENU_BUTTON_H__ |
6 #define CHROME_VIEWS_MENU_BUTTON_H__ | 6 #define CHROME_VIEWS_MENU_BUTTON_H__ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "chrome/common/gfx/chrome_font.h" | 10 #include "chrome/common/gfx/chrome_font.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 int GetMaximumScreenXCoordinate(); | 74 int GetMaximumScreenXCoordinate(); |
75 | 75 |
76 DISALLOW_EVIL_CONSTRUCTORS(MenuButton); | 76 DISALLOW_EVIL_CONSTRUCTORS(MenuButton); |
77 | 77 |
78 // We use a time object in order to keep track of when the menu was closed. | 78 // We use a time object in order to keep track of when the menu was closed. |
79 // The time is used for simulating menu behavior for the menu button; that | 79 // The time is used for simulating menu behavior for the menu button; that |
80 // is, if the menu is shown and the button is pressed, we need to close the | 80 // is, if the menu is shown and the button is pressed, we need to close the |
81 // menu. There is no clean way to get the second click event because the | 81 // menu. There is no clean way to get the second click event because the |
82 // menu is displayed using a modal loop and, unlike regular menus in Windows, | 82 // menu is displayed using a modal loop and, unlike regular menus in Windows, |
83 // the button is not part of the displayed menu. | 83 // the button is not part of the displayed menu. |
84 Time menu_closed_time_; | 84 base::Time menu_closed_time_; |
85 | 85 |
86 // The associated menu's resource identifier. | 86 // The associated menu's resource identifier. |
87 ViewMenuDelegate* menu_delegate_; | 87 ViewMenuDelegate* menu_delegate_; |
88 | 88 |
89 // Whether or not we're showing a drop marker. | 89 // Whether or not we're showing a drop marker. |
90 bool show_menu_marker_; | 90 bool show_menu_marker_; |
91 | 91 |
92 friend class TextButtonBackground; | 92 friend class TextButtonBackground; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace views | 95 } // namespace views |
96 | 96 |
97 #endif // CHROME_VIEWS_MENU_BUTTON_H__ | 97 #endif // CHROME_VIEWS_MENU_BUTTON_H__ |
98 | 98 |
OLD | NEW |