Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: ui/views/controls/button/menu_button.h

Issue 2680643002: Add old_state parameter to CustomButton::StateChanged (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/controls/button/menu_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/controls/button/menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698