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

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

Issue 2399603002: views: don't send OnKeypressUnhandled for all keys (Closed)
Patch Set: OnKeypressUnhandled -> OnEditFailed 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/controls/textfield/textfield.cc ('k') | ui/views/style/platform_style.cc » ('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 #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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Applies platform styles to |label| and fills |color_by_state| with the text 79 // 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 80 // colors for normal, pressed, hovered, and disabled states, if the colors for
81 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme. 81 // Button::STYLE_BUTTON buttons differ from those provided by ui::NativeTheme.
82 static void ApplyLabelButtonTextStyle(Label* label, 82 static void ApplyLabelButtonTextStyle(Label* label,
83 ButtonColorByState* color_by_state); 83 ButtonColorByState* color_by_state);
84 84
85 // Applies the current system theme to the default border created by |button|. 85 // Applies the current system theme to the default border created by |button|.
86 static std::unique_ptr<Border> CreateThemedLabelButtonBorder( 86 static std::unique_ptr<Border> CreateThemedLabelButtonBorder(
87 LabelButton* button); 87 LabelButton* button);
88 88
89 // Called whenever a textfield keypress is unhandled for any reason. Gives 89 // Called whenever a textfield edit fails. Gives visual/audio feedback about
90 // visual/audio feedback about the unhandled key if platform-appropriate. 90 // the failed edit if platform-appropriate.
91 static void OnTextfieldKeypressUnhandled(); 91 static void OnTextfieldEditFailed();
92 92
93 private: 93 private:
94 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle); 94 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformStyle);
95 }; 95 };
96 96
97 } // namespace views 97 } // namespace views
98 98
99 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_ 99 #endif // UI_VIEWS_STYLE_PLATFORM_STYLE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/style/platform_style.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698