summaryrefslogtreecommitdiffstats
path: root/ui/aura/event.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-16 19:09:02 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-16 19:09:02 +0000
commitbadc5a57fd63efdb03ce99e65d4dd9e90a2f870e (patch)
tree700c204a8e994b0c3e42b4d88b48c248d1353b6e /ui/aura/event.h
parentaf9884f13671ccbab814a99cf97c9d63ba58d0d5 (diff)
downloadchromium_src-badc5a57fd63efdb03ce99e65d4dd9e90a2f870e.zip
chromium_src-badc5a57fd63efdb03ce99e65d4dd9e90a2f870e.tar.gz
chromium_src-badc5a57fd63efdb03ce99e65d4dd9e90a2f870e.tar.bz2
Copy native event when creating new NativeWebKeyboardEvent
BUG=none TEST=none Review URL: http://codereview.chromium.org/8961006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/event.h')
-rw-r--r--ui/aura/event.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/aura/event.h b/ui/aura/event.h
index f4478f8..2f36516 100644
--- a/ui/aura/event.h
+++ b/ui/aura/event.h
@@ -25,6 +25,8 @@ class Window;
class AURA_EXPORT Event {
public:
+ virtual ~Event();
+
const base::NativeEvent& native_event() const { return native_event_; }
ui::EventType type() const { return type_; }
const base::Time& time_stamp() const { return time_stamp_; }
@@ -43,6 +45,9 @@ class AURA_EXPORT Event {
Event(const Event& copy);
void set_type(ui::EventType type) { type_ = type; }
void set_flags(int flags) { flags_ = flags; }
+ void set_delete_native_event(bool delete_native_event) {
+ delete_native_event_ = delete_native_event;
+ }
private:
void operator=(const Event&);
@@ -55,6 +60,7 @@ class AURA_EXPORT Event {
ui::EventType type_;
base::Time time_stamp_;
int flags_;
+ bool delete_native_event_;
};
class AURA_EXPORT LocatedEvent : public Event {
@@ -168,6 +174,9 @@ class AURA_EXPORT KeyEvent : public Event {
// modifiers (except shift).
uint16 GetUnmodifiedCharacter() const;
+ // Returns the copy of this key event. Used in NativeWebKeyboardEvent.
+ KeyEvent* Copy();
+
ui::KeyboardCode key_code() const { return key_code_; }
bool is_char() const { return is_char_; }