summaryrefslogtreecommitdiffstats
path: root/views/event.h
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.h
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.h')
-rw-r--r--views/event.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/views/event.h b/views/event.h
index 1ec666d..f878e2d 100644
--- a/views/event.h
+++ b/views/event.h
@@ -13,6 +13,7 @@
#if defined(OS_LINUX)
typedef struct _GdkEventKey GdkEventKey;
#endif
+
#if defined(TOUCH_UI)
typedef union _XEvent XEvent;
#endif
@@ -332,7 +333,9 @@ class KeyEvent : public Event {
int repeat_count,
int message_flags);
#if defined(OS_LINUX)
- explicit KeyEvent(GdkEventKey* event);
+ explicit KeyEvent(const GdkEventKey* event);
+
+ const GdkEventKey* native_event() const { return native_event_; }
#endif
#if defined(TOUCH_UI)
@@ -366,7 +369,9 @@ class KeyEvent : public Event {
app::KeyboardCode key_code_;
int repeat_count_;
int message_flags_;
-
+#if defined(OS_LINUX)
+ const GdkEventKey* native_event_;
+#endif
DISALLOW_COPY_AND_ASSIGN(KeyEvent);
};