| Index: ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.cc b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| index 5b504d4ad764cbad099d4b1b1cd90cf2503618ef..6a58a44e38bd4bb8ba8a04df56d59422090aa831 100644
|
| --- a/ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| +++ b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
|
| @@ -96,7 +96,7 @@ ui::NativeTheme::ExtraParams
|
| ScrollBarButton::GetNativeThemeParams() const {
|
| ui::NativeTheme::ExtraParams params;
|
|
|
| - switch (state_) {
|
| + switch (state()) {
|
| case CustomButton::STATE_HOVERED:
|
| params.scrollbar_arrow.is_hovering = true;
|
| break;
|
| @@ -126,25 +126,17 @@ ui::NativeTheme::Part
|
|
|
| ui::NativeTheme::State
|
| ScrollBarButton::GetNativeThemeState() const {
|
| - ui::NativeTheme::State state;
|
| -
|
| - switch (state_) {
|
| + switch (state()) {
|
| case CustomButton::STATE_HOVERED:
|
| - state = ui::NativeTheme::kHovered;
|
| - break;
|
| + return ui::NativeTheme::kHovered;
|
| case CustomButton::STATE_PRESSED:
|
| - state = ui::NativeTheme::kPressed;
|
| - break;
|
| + return ui::NativeTheme::kPressed;
|
| case CustomButton::STATE_DISABLED:
|
| - state = ui::NativeTheme::kDisabled;
|
| - break;
|
| + return ui::NativeTheme::kDisabled;
|
| case CustomButton::STATE_NORMAL:
|
| default:
|
| - state = ui::NativeTheme::kNormal;
|
| - break;
|
| + return ui::NativeTheme::kNormal;
|
| }
|
| -
|
| - return state;
|
| }
|
|
|
| /////////////////////////////////////////////////////////////////////////////
|
| @@ -197,25 +189,17 @@ ui::NativeTheme::Part ScrollBarThumb::GetNativeThemePart() const {
|
| }
|
|
|
| ui::NativeTheme::State ScrollBarThumb::GetNativeThemeState() const {
|
| - ui::NativeTheme::State state;
|
| -
|
| switch (GetState()) {
|
| case CustomButton::STATE_HOVERED:
|
| - state = ui::NativeTheme::kHovered;
|
| - break;
|
| + return ui::NativeTheme::kHovered;
|
| case CustomButton::STATE_PRESSED:
|
| - state = ui::NativeTheme::kPressed;
|
| - break;
|
| + return ui::NativeTheme::kPressed;
|
| case CustomButton::STATE_DISABLED:
|
| - state = ui::NativeTheme::kDisabled;
|
| - break;
|
| + return ui::NativeTheme::kDisabled;
|
| case CustomButton::STATE_NORMAL:
|
| default:
|
| - state = ui::NativeTheme::kNormal;
|
| - break;
|
| + return ui::NativeTheme::kNormal;
|
| }
|
| -
|
| - return state;
|
| }
|
|
|
| } // namespace
|
|
|