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

Side by Side Diff: ui/views/style/platform_style_mac.mm

Issue 2391393002: Harmony - Use FocusableBorder for comboboxes on Mac (Closed)
Patch Set: more 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
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 "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/gfx/color_utils.h" 9 #include "ui/gfx/color_utils.h"
10 #include "ui/gfx/paint_vector_icon.h" 10 #include "ui/gfx/paint_vector_icon.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 : gfx::VectorIconId::COMBOBOX_ARROW_MAC_DISABLED, 46 : gfx::VectorIconId::COMBOBOX_ARROW_MAC_DISABLED,
47 kComboboxArrowWidth, SK_ColorBLACK); 47 kComboboxArrowWidth, SK_ColorBLACK);
48 } 48 }
49 49
50 // static 50 // static
51 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() { 51 std::unique_ptr<FocusableBorder> PlatformStyle::CreateComboboxBorder() {
52 return base::WrapUnique(new FocusableRoundedBorder); 52 return base::WrapUnique(new FocusableRoundedBorder);
53 } 53 }
54 54
55 // static 55 // static
56 std::unique_ptr<Background> PlatformStyle::CreateComboboxBackground(
57 int shoulder_width) {
58 return base::MakeUnique<ComboboxBackgroundMac>(shoulder_width);
59 }
60
61 // static
62 std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) { 56 std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
63 return base::MakeUnique<CocoaScrollBar>(is_horizontal); 57 return base::MakeUnique<CocoaScrollBar>(is_horizontal);
64 } 58 }
65 59
66 // static 60 // static
67 SkColor PlatformStyle::TextColorForButton( 61 SkColor PlatformStyle::TextColorForButton(
68 const ButtonColorByState& color_by_state, 62 const ButtonColorByState& color_by_state,
69 const LabelButton& button) { 63 const LabelButton& button) {
70 Button::ButtonState state = button.state(); 64 Button::ButtonState state = button.state();
71 if (button.style() == Button::STYLE_BUTTON && button.is_default()) { 65 if (button.style() == Button::STYLE_BUTTON && button.is_default()) {
(...skipping 11 matching lines...) Expand all
83 ButtonColorByState& colors = *color_by_state; 77 ButtonColorByState& colors = *color_by_state;
84 colors[Button::STATE_PRESSED] = SK_ColorWHITE; 78 colors[Button::STATE_PRESSED] = SK_ColorWHITE;
85 } 79 }
86 80
87 // static 81 // static
88 void PlatformStyle::OnTextfieldKeypressUnhandled() { 82 void PlatformStyle::OnTextfieldKeypressUnhandled() {
89 NSBeep(); 83 NSBeep();
90 } 84 }
91 85
92 } // namespace views 86 } // namespace views
OLDNEW
« ui/views/controls/combobox/combobox.cc ('K') | « ui/views/style/platform_style.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698