| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 protected: | 89 protected: |
| 90 // Paint the menu marker image. | 90 // Paint the menu marker image. |
| 91 void PaintMenuMarker(gfx::Canvas* canvas); | 91 void PaintMenuMarker(gfx::Canvas* canvas); |
| 92 | 92 |
| 93 // Overridden from LabelButton: | 93 // Overridden from LabelButton: |
| 94 gfx::Rect GetChildAreaBounds() override; | 94 gfx::Rect GetChildAreaBounds() override; |
| 95 | 95 |
| 96 // Overridden from CustomButton: | 96 // Overridden from CustomButton: |
| 97 bool IsTriggerableEvent(const ui::Event& event) override; | 97 bool IsTriggerableEvent(const ui::Event& event) override; |
| 98 bool ShouldEnterPushedState(const ui::Event& event) override; | 98 bool ShouldEnterPushedState(const ui::Event& event) override; |
| 99 void StateChanged() override; | 99 void StateChanged(ButtonState old_state) override; |
| 100 void NotifyClick(const ui::Event& event) override; | 100 void NotifyClick(const ui::Event& event) override; |
| 101 | 101 |
| 102 // Offset of the associated menu position. | 102 // Offset of the associated menu position. |
| 103 gfx::Point menu_offset_; | 103 gfx::Point menu_offset_; |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 friend class PressedLock; | 106 friend class PressedLock; |
| 107 | 107 |
| 108 // Increment/decrement the number of "pressed" locks this button has, and | 108 // Increment/decrement the number of "pressed" locks this button has, and |
| 109 // set the state accordingly. The ink drop is snapped to the final ACTIVATED | 109 // set the state accordingly. The ink drop is snapped to the final ACTIVATED |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 bool should_disable_after_press_; | 149 bool should_disable_after_press_; |
| 150 | 150 |
| 151 base::WeakPtrFactory<MenuButton> weak_factory_; | 151 base::WeakPtrFactory<MenuButton> weak_factory_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 153 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace views | 156 } // namespace views |
| 157 | 157 |
| 158 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 158 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |