| 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/label_button_border.h" | 5 #include "ui/views/controls/button/label_button_border.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
| 10 #include "ui/gfx/animation/animation.h" | 10 #include "ui/gfx/animation/animation.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return minimum_size; | 176 return minimum_size; |
| 177 } | 177 } |
| 178 | 178 |
| 179 Painter* LabelButtonAssetBorder::GetPainter(bool focused, | 179 Painter* LabelButtonAssetBorder::GetPainter(bool focused, |
| 180 Button::ButtonState state) { | 180 Button::ButtonState state) { |
| 181 return painters_[focused ? 1 : 0][state].get(); | 181 return painters_[focused ? 1 : 0][state].get(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void LabelButtonAssetBorder::SetPainter(bool focused, | 184 void LabelButtonAssetBorder::SetPainter(bool focused, |
| 185 Button::ButtonState state, | 185 Button::ButtonState state, |
| 186 Painter* painter) { | 186 std::unique_ptr<Painter> painter) { |
| 187 painters_[focused ? 1 : 0][state].reset(painter); | 187 painters_[focused ? 1 : 0][state] = std::move(painter); |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace views | 190 } // namespace views |
| OLD | NEW |