| 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/base/resource/material_design/material_design_controller.h" | 7 #include "ui/base/resource/material_design/material_design_controller.h" |
| 8 #include "ui/views/controls/button/label_button.h" | 8 #include "ui/views/controls/button/label_button.h" |
| 9 #include "ui/views/controls/button/label_button_border.h" | 9 #include "ui/views/controls/button/label_button_border.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 | 12 |
| 13 #if !defined(OS_MACOSX) | 13 #if !defined(OS_MACOSX) |
| 14 |
| 15 // static |
| 16 const bool PlatformStyle::kTextfieldDragVerticallyDragsToEnd = false; |
| 17 |
| 14 // static | 18 // static |
| 15 scoped_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder( | 19 scoped_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder( |
| 16 Button::ButtonStyle style) { | 20 Button::ButtonStyle style) { |
| 17 if (!ui::MaterialDesignController::IsModeMaterial() || | 21 if (!ui::MaterialDesignController::IsModeMaterial() || |
| 18 style != Button::STYLE_TEXTBUTTON) { | 22 style != Button::STYLE_TEXTBUTTON) { |
| 19 return make_scoped_ptr(new LabelButtonAssetBorder(style)); | 23 return make_scoped_ptr(new LabelButtonAssetBorder(style)); |
| 20 } | 24 } |
| 21 | 25 |
| 22 scoped_ptr<LabelButtonBorder> border(new views::LabelButtonBorder()); | 26 scoped_ptr<LabelButtonBorder> border(new views::LabelButtonBorder()); |
| 23 border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle( | 27 border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle( |
| 24 Button::STYLE_TEXTBUTTON)); | 28 Button::STYLE_TEXTBUTTON)); |
| 25 return border.Pass(); | 29 return border.Pass(); |
| 26 } | 30 } |
| 27 #endif | 31 #endif |
| 28 | 32 |
| 29 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) | 33 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) |
| 30 // static | 34 // static |
| 31 scoped_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( | 35 scoped_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( |
| 32 LabelButton* button) { | 36 LabelButton* button) { |
| 33 return button->CreateDefaultBorder(); | 37 return button->CreateDefaultBorder(); |
| 34 } | 38 } |
| 35 #endif | 39 #endif |
| 36 | 40 |
| 37 } // namespace views | 41 } // namespace views |
| OLD | NEW |