summaryrefslogtreecommitdiffstats
path: root/views/event_gtk.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-17 07:48:55 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-17 07:48:55 +0000
commitd98e7ceee03e22fbf3f93a9b4488128843ae59a1 (patch)
treeb07941d88f64a8a56783c55ba59bb18c6806a864 /views/event_gtk.cc
parent0c81ba665bab0e37ff9b82fdfd71d136044d5c96 (diff)
downloadchromium_src-d98e7ceee03e22fbf3f93a9b4488128843ae59a1.zip
chromium_src-d98e7ceee03e22fbf3f93a9b4488128843ae59a1.tar.gz
chromium_src-d98e7ceee03e22fbf3f93a9b4488128843ae59a1.tar.bz2
no native implementation of Textfield.
This is based on the original CL http://codereview.chromium.org/3142008. The key difference is * This uses Textfield framework and NativeTextfieldView implements NativeTextfieldWrapper. This allows us to swap the implementation without recompling the tree and can start testing on bots. * Changed the name of the model to TextfieldViewModel as TextfieldModel may be confusing as other Textfield implementations are not using it. I also changed to use string16 instead of gap buffer as it's enough for single line text. We can update the model to use GapBuffer when necessary. * Changed to use string16 as that's what chrome codebase should use. * Added a switch to turn on TextfieldView. I also filled a couple of features such as: * selection by key * mouse actions (move cursor, selection) * used WordIterator, which is i18n compatible, to move cursor by word * blinking cursor This is only for linux based build due to KeyStroke difference. I'm going to move some of test utlity function in chrome/browser/automation/ui_controls to app/test and will add more test once the migration is done. BUG=none TEST=new unit tests are added : NativeTestfieldViewTest and TextfieldViewModelTest. Review URL: http://codereview.chromium.org/5857002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/event_gtk.cc')
-rw-r--r--views/event_gtk.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/views/event_gtk.cc b/views/event_gtk.cc
index cae426d..5e29ad9 100644
--- a/views/event_gtk.cc
+++ b/views/event_gtk.cc
@@ -10,14 +10,18 @@
namespace views {
-KeyEvent::KeyEvent(GdkEventKey* event)
+KeyEvent::KeyEvent(const GdkEventKey* event)
: Event(event->type == GDK_KEY_PRESS ?
Event::ET_KEY_PRESSED : Event::ET_KEY_RELEASED,
GetFlagsFromGdkState(event->state)),
// TODO(erg): All these values are iffy.
key_code_(app::WindowsKeyCodeForGdkKeyCode(event->keyval)),
repeat_count_(0),
- message_flags_(0) {
+ message_flags_(0)
+#if !defined(TOUCH_UI)
+ , native_event_(event)
+#endif
+{
}
// static