| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // The down arrow used to differentiate the menu button from normal buttons. | 130 // The down arrow used to differentiate the menu button from normal buttons. |
| 131 const gfx::ImageSkia* menu_marker_; | 131 const gfx::ImageSkia* menu_marker_; |
| 132 | 132 |
| 133 // If non-null the destructor sets this to true. This is set while the menu is | 133 // If non-null the destructor sets this to true. This is set while the menu is |
| 134 // showing and used to detect if the menu was deleted while running. | 134 // showing and used to detect if the menu was deleted while running. |
| 135 bool* destroyed_flag_; | 135 bool* destroyed_flag_; |
| 136 | 136 |
| 137 // The current number of "pressed" locks this button has. | 137 // The current number of "pressed" locks this button has. |
| 138 int pressed_lock_count_; | 138 int pressed_lock_count_; |
| 139 | 139 |
| 140 // Used to let Activate() know if IncrementPressedLocked() was called. |
| 141 bool* increment_pressed_lock_called_; |
| 142 |
| 140 // True if the button was in a disabled state when a menu was run, and should | 143 // True if the button was in a disabled state when a menu was run, and should |
| 141 // return to it once the press is complete. This can happen if, e.g., we | 144 // return to it once the press is complete. This can happen if, e.g., we |
| 142 // programmatically show a menu on a disabled button. | 145 // programmatically show a menu on a disabled button. |
| 143 bool should_disable_after_press_; | 146 bool should_disable_after_press_; |
| 144 | 147 |
| 145 base::WeakPtrFactory<MenuButton> weak_factory_; | 148 base::WeakPtrFactory<MenuButton> weak_factory_; |
| 146 | 149 |
| 147 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 150 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace views | 153 } // namespace views |
| 151 | 154 |
| 152 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 155 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |