| 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/checkbox.h" | 5 #include "ui/views/controls/button/checkbox.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 UpdateImage(); | 158 UpdateImage(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void Checkbox::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 161 void Checkbox::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| 162 LabelButton::OnNativeThemeChanged(theme); | 162 LabelButton::OnNativeThemeChanged(theme); |
| 163 if (UseMd()) | 163 if (UseMd()) |
| 164 UpdateImage(); | 164 UpdateImage(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 std::unique_ptr<InkDropRipple> Checkbox::CreateInkDropRipple() const { | 167 std::unique_ptr<InkDropRipple> Checkbox::CreateInkDropRipple() const { |
| 168 return CreateDefaultInkDropRipple(image()->bounds().CenterPoint()); | 168 return CreateDefaultInkDropRipple(image()->GetMirroredBounds().CenterPoint()); |
| 169 } | 169 } |
| 170 | 170 |
| 171 std::unique_ptr<InkDropHighlight> Checkbox::CreateInkDropHighlight() const { | 171 std::unique_ptr<InkDropHighlight> Checkbox::CreateInkDropHighlight() const { |
| 172 return nullptr; | 172 return nullptr; |
| 173 } | 173 } |
| 174 | 174 |
| 175 SkColor Checkbox::GetInkDropBaseColor() const { | 175 SkColor Checkbox::GetInkDropBaseColor() const { |
| 176 return GetNativeTheme()->GetSystemColor( | 176 return GetNativeTheme()->GetSystemColor( |
| 177 ui::NativeTheme::kColorId_ButtonEnabledColor); | 177 ui::NativeTheme::kColorId_ButtonEnabledColor); |
| 178 } | 178 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 ui::NativeTheme::Part Checkbox::GetThemePart() const { | 223 ui::NativeTheme::Part Checkbox::GetThemePart() const { |
| 224 return ui::NativeTheme::kCheckbox; | 224 return ui::NativeTheme::kCheckbox; |
| 225 } | 225 } |
| 226 | 226 |
| 227 void Checkbox::GetExtraParams(ui::NativeTheme::ExtraParams* params) const { | 227 void Checkbox::GetExtraParams(ui::NativeTheme::ExtraParams* params) const { |
| 228 LabelButton::GetExtraParams(params); | 228 LabelButton::GetExtraParams(params); |
| 229 params->button.checked = checked_; | 229 params->button.checked = checked_; |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace views | 232 } // namespace views |
| OLD | NEW |