Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: ui/views/style/platform_style.cc

Issue 2358913006: views: remove PlatformStyle::CreateLabelButtonBorder (Closed)
Patch Set: remove DialogButtonBorderMac too Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/style/platform_style.h ('k') | ui/views/style/platform_style_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/base/material_design/material_design_controller.h" 9 #include "ui/base/material_design/material_design_controller.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return base::MakeUnique<FocusableBorder>(); 57 return base::MakeUnique<FocusableBorder>();
58 } 58 }
59 59
60 // static 60 // static
61 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground( 61 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground(
62 int shoulder_width) { 62 int shoulder_width) {
63 return nullptr; 63 return nullptr;
64 } 64 }
65 65
66 // static 66 // static
67 std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
68 Button::ButtonStyle style) {
69 if (!ui::MaterialDesignController::IsModeMaterial() ||
70 style != Button::STYLE_TEXTBUTTON) {
71 return base::MakeUnique<LabelButtonAssetBorder>(style);
72 }
73
74 std::unique_ptr<LabelButtonBorder> border(new views::LabelButtonBorder());
75 border->set_insets(views::LabelButtonAssetBorder::GetDefaultInsetsForStyle(
76 Button::STYLE_TEXTBUTTON));
77 return border;
78 }
79
80 // static
81 std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) { 67 std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
82 return base::MakeUnique<NativeScrollBar>(is_horizontal); 68 return base::MakeUnique<NativeScrollBar>(is_horizontal);
83 } 69 }
84 70
85 // static 71 // static
86 SkColor PlatformStyle::TextColorForButton( 72 SkColor PlatformStyle::TextColorForButton(
87 const ButtonColorByState& color_by_state, 73 const ButtonColorByState& color_by_state,
88 const LabelButton& button) { 74 const LabelButton& button) {
89 return color_by_state[button.state()]; 75 return color_by_state[button.state()];
90 } 76 }
(...skipping 24 matching lines...) Expand all
115 101
116 #if !defined(DESKTOP_LINUX) 102 #if !defined(DESKTOP_LINUX)
117 // static 103 // static
118 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( 104 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
119 LabelButton* button) { 105 LabelButton* button) {
120 return button->CreateDefaultBorder(); 106 return button->CreateDefaultBorder();
121 } 107 }
122 #endif 108 #endif
123 109
124 } // namespace views 110 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/style/platform_style.h ('k') | ui/views/style/platform_style_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698