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 UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // Our listener. Not owned. | 115 // Our listener. Not owned. |
116 MenuButtonListener* listener_; | 116 MenuButtonListener* listener_; |
117 | 117 |
118 // Whether or not we're showing a drop marker. | 118 // Whether or not we're showing a drop marker. |
119 bool show_menu_marker_; | 119 bool show_menu_marker_; |
120 | 120 |
121 // The down arrow used to differentiate the menu button from normal buttons. | 121 // The down arrow used to differentiate the menu button from normal buttons. |
122 const gfx::ImageSkia* menu_marker_; | 122 const gfx::ImageSkia* menu_marker_; |
123 | 123 |
124 // If non-null the destuctor sets this to true. This is set while the menu is | 124 // If non-null the destructor sets this to true. This is set while the menu is |
125 // showing and used to detect if the menu was deleted while running. | 125 // showing and used to detect if the menu was deleted while running. |
126 bool* destroyed_flag_; | 126 bool* destroyed_flag_; |
127 | 127 |
128 // The current number of "pressed" locks this button has. | 128 // The current number of "pressed" locks this button has. |
129 int pressed_lock_count_; | 129 int pressed_lock_count_; |
130 | 130 |
131 // True if the button was in a disabled state when a menu was run, and should | 131 // True if the button was in a disabled state when a menu was run, and should |
132 // return to it once the press is complete. This can happen if, e.g., we | 132 // return to it once the press is complete. This can happen if, e.g., we |
133 // programmatically show a menu on a disabled button. | 133 // programmatically show a menu on a disabled button. |
134 bool should_disable_after_press_; | 134 bool should_disable_after_press_; |
135 | 135 |
136 base::WeakPtrFactory<MenuButton> weak_factory_; | 136 base::WeakPtrFactory<MenuButton> weak_factory_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 138 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace views | 141 } // namespace views |
142 | 142 |
143 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 143 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
OLD | NEW |