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

Unified Diff: views/controls/textfield/textfield.cc

Issue 5857002: no native implementation of Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | views/controls/textfield/textfield_views_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.cc
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index 81c74d26aebbf74aab3576d4b28de99002769a68..e92794daae21721d34adbe55ca34f6ed6a7850e4 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -358,8 +358,7 @@ app::KeyboardCode Textfield::Keystroke::GetKeyboardCode() const {
#if defined(OS_WIN)
return static_cast<app::KeyboardCode>(key_);
#else
- return static_cast<app::KeyboardCode>(
- app::WindowsKeyCodeForGdkKeyCode(event_.keyval));
+ return event_->GetKeyCode();
#endif
}
@@ -373,13 +372,11 @@ bool Textfield::Keystroke::IsShiftHeld() const {
}
#else
bool Textfield::Keystroke::IsControlHeld() const {
- return (event_.state & gtk_accelerator_get_default_mod_mask()) ==
- GDK_CONTROL_MASK;
+ return event_->IsControlDown();
}
bool Textfield::Keystroke::IsShiftHeld() const {
- return (event_.state & gtk_accelerator_get_default_mod_mask()) ==
- GDK_SHIFT_MASK;
+ return event_->IsShiftDown();
}
#endif
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | views/controls/textfield/textfield_views_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698