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

Unified Diff: ui/views/controls/button/button.cc

Issue 132023010: linux_aura: Fixes a couple of issues with the button border integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constant and braces Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/button.h ('k') | ui/views/controls/button/label_button_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/button.cc
diff --git a/ui/views/controls/button/button.cc b/ui/views/controls/button/button.cc
index 83df6e2b99cbe76ec1960263bad7d62a15e611fb..d19b0167577ddb65d135f62f5fa3781c4f76f230 100644
--- a/ui/views/controls/button/button.cc
+++ b/ui/views/controls/button/button.cc
@@ -10,6 +10,21 @@
namespace views {
////////////////////////////////////////////////////////////////////////////////
+// Button, static public:
+
+// static
+Button::ButtonState Button::GetButtonStateFrom(ui::NativeTheme::State state) {
+ switch (state) {
+ case ui::NativeTheme::kDisabled: return Button::STATE_DISABLED;
+ case ui::NativeTheme::kHovered: return Button::STATE_HOVERED;
+ case ui::NativeTheme::kNormal: return Button::STATE_NORMAL;
+ case ui::NativeTheme::kPressed: return Button::STATE_PRESSED;
+ case ui::NativeTheme::kMaxState: NOTREACHED() << "Unknown state: " << state;
+ }
+ return Button::STATE_NORMAL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
// Button, public:
Button::~Button() {
« no previous file with comments | « ui/views/controls/button/button.h ('k') | ui/views/controls/button/label_button_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698