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

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

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 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 5 #ifndef UI_VIEWS_STYLE_PLATFORM_STYLE_H_
6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 6 #define UI_VIEWS_STYLE_PLATFORM_STYLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Creates an ImageSkia containing the image to use for the combobox arrow. 58 // Creates an ImageSkia containing the image to use for the combobox arrow.
59 // The |is_enabled| argument is true if the control the arrow is for is 59 // The |is_enabled| argument is true if the control the arrow is for is
60 // enabled, and false if the control is disabled. The |style| argument is the 60 // enabled, and false if the control is disabled. The |style| argument is the
61 // style of the combobox the arrow is being drawn for. 61 // style of the combobox the arrow is being drawn for.
62 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled, 62 static gfx::ImageSkia CreateComboboxArrow(bool is_enabled,
63 Combobox::Style style); 63 Combobox::Style style);
64 64
65 // Creates the appropriate border for a focusable Combobox. 65 // Creates the appropriate border for a focusable Combobox.
66 static std::unique_ptr<FocusableBorder> CreateComboboxBorder(); 66 static std::unique_ptr<FocusableBorder> CreateComboboxBorder();
67 67
68 // Creates the appropriate background for a Combobox.
69 static std::unique_ptr<Background> CreateComboboxBackground(
70 int shoulder_width);
71
72 // Creates the default scrollbar for the given orientation. 68 // Creates the default scrollbar for the given orientation.
73 static std::unique_ptr<ScrollBar> CreateScrollBar(bool is_horizontal); 69 static std::unique_ptr<ScrollBar> CreateScrollBar(bool is_horizontal);
74 70
75 // Returns the current text color for the current button state. 71 // Returns the current text color for the current button state.
76 static SkColor TextColorForButton(const ButtonColorByState& color_by_state, 72 static SkColor TextColorForButton(const ButtonColorByState& color_by_state,
77 const LabelButton& button); 73 const LabelButton& button);
78 74
79 // Applies platform styles to |label| and fills |color_by_state| with the text 75 // Applies platform styles to |label| and fills |color_by_state| with the text
80 // colors for normal, pressed, hovered, and disabled states, if the colors for 76 // colors for normal, pressed, hovered, and disabled states, if the colors for
81 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme. 77 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme.
82 static void ApplyLabelButtonTextStyle(Label* label, 78 static void ApplyLabelButtonTextStyle(Label* label,
83 ButtonColorByState* color_by_state); 79 ButtonColorByState* color_by_state);
84 80
85 // Applies the current system theme to the default border created by |button|. 81 // Applies the current system theme to the default border created by |button|.
86 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( 82 static std::unique_ptr<Border> CreateThemedLabelButtonBorder(
87 LabelButton* button); 83 LabelButton* button);
88 84
89 // Called whenever a textfield keypress is unhandled for any reason. Gives 85 // Called whenever a textfield keypress is unhandled for any reason. Gives
90 // visual/audio feedback about the unhandled key if platform-appropriate. 86 // visual/audio feedback about the unhandled key if platform-appropriate.
91 static void OnTextfieldKeypressUnhandled(); 87 static void OnTextfieldKeypressUnhandled();
92 88
93 private: 89 private:
94 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); 90 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle);
95 }; 91 };
96 92
97 } // namespace views 93 } // namespace views
98 94
99 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 95 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698