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

Unified Diff: ui/aura/event.h

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge removal of compact nav. Created 9 years, 3 months 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 | « ui/aura/aura.gyp ('k') | ui/aura/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/event.h
diff --git a/ui/aura/event.h b/ui/aura/event.h
index 35608054658d10ee1ed68fe91fe1be68a5232f5f..f619c12f258a94d5ecb339604ceb47868befbd75 100644
--- a/ui/aura/event.h
+++ b/ui/aura/event.h
@@ -13,30 +13,20 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/gfx/point.h"
-#if defined(USE_X11)
-typedef union _XEvent XEvent;
-#endif
-
namespace aura {
-#if defined(OS_WIN)
-typedef MSG NativeEvent;
-#elif defined(USE_X11)
-typedef XEvent* NativeEvent;
-#endif
-
class Window;
class AURA_EXPORT Event {
public:
- const NativeEvent& native_event() const { return native_event_; }
+ const ui::NativeEvent& native_event() const { return native_event_; }
ui::EventType type() const { return type_; }
const base::Time& time_stamp() const { return time_stamp_; }
int flags() const { return flags_; }
protected:
Event(ui::EventType type, int flags);
- Event(NativeEvent native_event, ui::EventType type, int flags);
+ Event(const ui::NativeEvent& native_event, ui::EventType type, int flags);
Event(const Event& copy);
void set_type(ui::EventType type) { type_ = type; }
@@ -45,9 +35,9 @@ class AURA_EXPORT Event {
// Safely initializes the native event members of this class.
void Init();
- void InitWithNativeEvent(NativeEvent native_event);
+ void InitWithNativeEvent(const ui::NativeEvent& native_event);
- NativeEvent native_event_;
+ ui::NativeEvent native_event_;
ui::EventType type_;
base::Time time_stamp_;
int flags_;
@@ -60,7 +50,7 @@ class AURA_EXPORT LocatedEvent : public Event {
gfx::Point location() const { return location_; }
protected:
- explicit LocatedEvent(NativeEvent native_event);
+ explicit LocatedEvent(const ui::NativeEvent& native_event);
// Create a new LocatedEvent which is identical to the provided model.
// If source / target windows are provided, the model location will be
@@ -78,7 +68,7 @@ class AURA_EXPORT LocatedEvent : public Event {
class AURA_EXPORT MouseEvent : public LocatedEvent {
public:
- explicit MouseEvent(NativeEvent native_event);
+ explicit MouseEvent(const ui::NativeEvent& native_event);
// Create a new MouseEvent which is identical to the provided model.
// If source / target windows are provided, the model location will be
@@ -98,7 +88,7 @@ class AURA_EXPORT MouseEvent : public LocatedEvent {
class AURA_EXPORT KeyEvent : public Event {
public:
- explicit KeyEvent(NativeEvent native_event);
+ explicit KeyEvent(const ui::NativeEvent& native_event);
// Used for synthetic events in testing.
KeyEvent(ui::EventType type,
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698