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

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

Issue 1971333002: Views: factor out Combobox background and const-ify style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ios build break Created 4 years, 7 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 45 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
46 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW); 46 return *rb.GetImageSkiaNamed(IDR_MENU_DROPARROW);
47 } 47 }
48 48
49 // static 49 // static
50 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { 50 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() {
51 return base::WrapUnique(new FocusableBorder()); 51 return base::WrapUnique(new FocusableBorder());
52 } 52 }
53 53
54 // static 54 // static
55 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground() { 55 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground(
56 int shoulder_width) {
56 return nullptr; 57 return nullptr;
57 } 58 }
58 59
59 // static 60 // static
60 std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder( 61 std::unique_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
61 Button::ButtonStyle style) { 62 Button::ButtonStyle style) {
62 if (!ui::MaterialDesignController::IsModeMaterial() || 63 if (!ui::MaterialDesignController::IsModeMaterial() ||
63 style != Button::STYLE_TEXTBUTTON) { 64 style != Button::STYLE_TEXTBUTTON) {
64 return base::WrapUnique(new LabelButtonAssetBorder(style)); 65 return base::WrapUnique(new LabelButtonAssetBorder(style));
65 } 66 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 106
106 #if !defined(DESKTOP_LINUX) 107 #if !defined(DESKTOP_LINUX)
107 // static 108 // static
108 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder( 109 std::unique_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
109 LabelButton* button) { 110 LabelButton* button) {
110 return button->CreateDefaultBorder(); 111 return button->CreateDefaultBorder();
111 } 112 }
112 #endif 113 #endif
113 114
114 } // namespace views 115 } // 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