Chromium Code Reviews| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; | 78 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
| 79 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 79 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 // Paint the menu marker image. | 82 // Paint the menu marker image. |
| 83 void PaintMenuMarker(gfx::Canvas* canvas); | 83 void PaintMenuMarker(gfx::Canvas* canvas); |
| 84 | 84 |
| 85 // Overridden from LabelButton: | 85 // Overridden from LabelButton: |
| 86 virtual gfx::Rect GetChildAreaBounds() OVERRIDE; | 86 virtual gfx::Rect GetChildAreaBounds() OVERRIDE; |
| 87 | 87 |
| 88 // Overridden from MenuButton: | |
|
flackr
2014/10/14 14:11:06
Overridden from MenuButton? Isn't this MenuButton?
jonross
2014/10/14 16:00:48
Yup, meant CustomButton.
| |
| 89 virtual bool ShouldEnterPushedState(const ui::Event& event) OVERRIDE; | |
| 90 | |
| 88 // Offset of the associated menu position. | 91 // Offset of the associated menu position. |
| 89 gfx::Point menu_offset_; | 92 gfx::Point menu_offset_; |
| 90 | 93 |
| 91 private: | 94 private: |
| 92 friend class PressedLock; | 95 friend class PressedLock; |
| 93 | 96 |
| 94 // Increment/decrement the number of "pressed" locks this button has, and | 97 // Increment/decrement the number of "pressed" locks this button has, and |
| 95 // set the state accordingly. | 98 // set the state accordingly. |
| 96 void IncrementPressedLocked(); | 99 void IncrementPressedLocked(); |
| 97 void DecrementPressedLocked(); | 100 void DecrementPressedLocked(); |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 125 int pressed_lock_count_; | 128 int pressed_lock_count_; |
| 126 | 129 |
| 127 base::WeakPtrFactory<MenuButton> weak_factory_; | 130 base::WeakPtrFactory<MenuButton> weak_factory_; |
| 128 | 131 |
| 129 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 132 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
| 130 }; | 133 }; |
| 131 | 134 |
| 132 } // namespace views | 135 } // namespace views |
| 133 | 136 |
| 134 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 137 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |