summaryrefslogtreecommitdiffstats
path: root/views/event.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 16:28:44 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-08 16:28:44 +0000
commit0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb (patch)
treea2bcf52eaa02b828865954b6fb800fccee08463b /views/event.h
parentb57c599f4d27dbd93db10033d599fbb512611788 (diff)
downloadchromium_src-0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb.zip
chromium_src-0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb.tar.gz
chromium_src-0e0e6d757d44f0b0a3678a714c0c09186e3aa6eb.tar.bz2
Enabling the default button behavior on Linux toolkit_views.
I had to make the KeyEvent constructor include the event flags. Also cleaned-up some unit-tests BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/266012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/event.h')
-rw-r--r--views/event.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/views/event.h b/views/event.h
index 138327d..d7831ce 100644
--- a/views/event.h
+++ b/views/event.h
@@ -241,13 +241,13 @@ class MouseEvent : public LocatedEvent {
////////////////////////////////////////////////////////////////////////////////
class KeyEvent : public Event {
public:
-#if defined(OS_WIN)
// Create a new key event
KeyEvent(EventType type,
base::KeyboardCode key_code,
+ int event_flags,
int repeat_count,
int message_flags);
-#elif defined(OS_LINUX)
+#if defined(OS_LINUX)
explicit KeyEvent(GdkEventKey* event);
#endif
@@ -267,11 +267,13 @@ class KeyEvent : public Event {
return repeat_count_;
}
- private:
#if defined(OS_WIN)
- int GetKeyStateFlags() const;
+ // Returns the current state of the KeyState.
+ static int GetKeyStateFlags();
#endif
+ private:
+
base::KeyboardCode key_code_;
int repeat_count_;
int message_flags_;