OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/style/platform_style.h" | 5 #include "ui/views/style/platform_style.h" |
6 | 6 |
7 #include "ui/views/controls/button/label_button.h" | 7 #include "ui/views/controls/button/label_button.h" |
8 #include "ui/views/controls/button/label_button_border.h" | 8 #include "ui/views/controls/button/label_button_border.h" |
9 #include "ui/views/linux_ui/linux_ui.h" | 9 #include "ui/views/linux_ui/linux_ui.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 // static | 13 // static |
14 scoped_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( | 14 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( |
15 LabelButton* button) { | 15 LabelButton* button) { |
16 views::LinuxUI* linux_ui = views::LinuxUI::instance(); | 16 views::LinuxUI* linux_ui = views::LinuxUI::instance(); |
17 if (linux_ui) | 17 if (linux_ui) |
18 return linux_ui->CreateNativeBorder(button, button->CreateDefaultBorder()); | 18 return linux_ui->CreateNativeBorder(button, button->CreateDefaultBorder()); |
19 return button->CreateDefaultBorder(); | 19 return button->CreateDefaultBorder(); |
20 } | 20 } |
21 | 21 |
22 void PlatformStyle::ApplyLabelButtonTextStyle(Label* label, | 22 void PlatformStyle::ApplyLabelButtonTextStyle(Label* label, |
23 ButtonColorByState* colors) { | 23 ButtonColorByState* colors) { |
24 // TODO(erg): This is disabled on desktop linux because of the binary asset | 24 // TODO(erg): This is disabled on desktop linux because of the binary asset |
25 // confusion. These details should either be pushed into ui::NativeThemeWin | 25 // confusion. These details should either be pushed into ui::NativeThemeWin |
26 // or should be obsoleted by rendering buttons with paint calls instead of | 26 // or should be obsoleted by rendering buttons with paint calls instead of |
27 // with static assets. http://crbug.com/350498 | 27 // with static assets. http://crbug.com/350498 |
28 } | 28 } |
29 | 29 |
30 } // namespace views | 30 } // namespace views |
OLD | NEW |