| 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/combobox/combobox.h" | 5 #include "ui/views/controls/combobox/combobox.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // The transparent button which holds a button state but is not rendered. | 88 // The transparent button which holds a button state but is not rendered. |
| 89 class TransparentButton : public CustomButton { | 89 class TransparentButton : public CustomButton { |
| 90 public: | 90 public: |
| 91 TransparentButton(ButtonListener* listener) | 91 TransparentButton(ButtonListener* listener) |
| 92 : CustomButton(listener) { | 92 : CustomButton(listener) { |
| 93 SetAnimationDuration(LabelButton::kHoverAnimationDurationMs); | 93 SetAnimationDuration(LabelButton::kHoverAnimationDurationMs); |
| 94 } | 94 } |
| 95 virtual ~TransparentButton() {} | 95 virtual ~TransparentButton() {} |
| 96 | 96 |
| 97 virtual bool OnMousePressed(const ui::MouseEvent& mouse_event) OVERRIDE { | 97 virtual bool OnMousePressed(const ui::MouseEvent& mouse_event) override { |
| 98 parent()->RequestFocus(); | 98 parent()->RequestFocus(); |
| 99 return true; | 99 return true; |
| 100 } | 100 } |
| 101 | 101 |
| 102 double GetAnimationValue() const { | 102 double GetAnimationValue() const { |
| 103 return hover_animation_->GetCurrentValue(); | 103 return hover_animation_->GetCurrentValue(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 DISALLOW_COPY_AND_ASSIGN(TransparentButton); | 107 DISALLOW_COPY_AND_ASSIGN(TransparentButton); |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 const ui::NativeTheme* native_theme_for_arrow = GetNativeTheme(); | 859 const ui::NativeTheme* native_theme_for_arrow = GetNativeTheme(); |
| 860 #endif | 860 #endif |
| 861 | 861 |
| 862 ui::NativeTheme::ExtraParams ignored; | 862 ui::NativeTheme::ExtraParams ignored; |
| 863 return native_theme_for_arrow->GetPartSize(ui::NativeTheme::kComboboxArrow, | 863 return native_theme_for_arrow->GetPartSize(ui::NativeTheme::kComboboxArrow, |
| 864 ui::NativeTheme::kNormal, | 864 ui::NativeTheme::kNormal, |
| 865 ignored); | 865 ignored); |
| 866 } | 866 } |
| 867 | 867 |
| 868 } // namespace views | 868 } // namespace views |
| OLD | NEW |