| 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 #include "ui/views/controls/button/custom_button.h" | 5 #include "ui/views/controls/button/custom_button.h" |
| 6 | 6 |
| 7 #include "ui/base/accessibility/accessible_view_state.h" | 7 #include "ui/base/accessibility/accessible_view_state.h" |
| 8 #include "ui/base/animation/throb_animation.h" | 8 #include "ui/base/animation/throb_animation.h" |
| 9 #include "ui/base/event.h" | 9 #include "ui/base/events/event.h" |
| 10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
| 11 #include "ui/gfx/screen.h" | 11 #include "ui/gfx/screen.h" |
| 12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 | 15 |
| 16 // How long the hover animation takes if uninterrupted. | 16 // How long the hover animation takes if uninterrupted. |
| 17 static const int kHoverFadeDurationMs = 150; | 17 static const int kHoverFadeDurationMs = 150; |
| 18 | 18 |
| 19 // static | 19 // static |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 if (!is_add && state_ != BS_DISABLED) | 320 if (!is_add && state_ != BS_DISABLED) |
| 321 SetState(BS_NORMAL); | 321 SetState(BS_NORMAL); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void CustomButton::OnBlur() { | 324 void CustomButton::OnBlur() { |
| 325 if (IsHotTracked()) | 325 if (IsHotTracked()) |
| 326 SetState(BS_NORMAL); | 326 SetState(BS_NORMAL); |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace views | 329 } // namespace views |
| OLD | NEW |