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

Unified Diff: ui/aura/event.cc

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to ash/ime/ Created 9 years 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/event.h ('k') | ui/aura/event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/event.cc
diff --git a/ui/aura/event.cc b/ui/aura/event.cc
index 56288632b28ae3e9bf9d8376ec9a0b6a8e6342a9..bdd4764fdf04b60e77a851de59fd3fe99c6a6203 100644
--- a/ui/aura/event.cc
+++ b/ui/aura/event.cc
@@ -8,6 +8,8 @@
#include <X11/Xlib.h>
#endif
+#include <cstring>
+
#include "ui/aura/window.h"
#include "ui/base/keycodes/keyboard_code_conversion.h"
#include "ui/gfx/point3.h"
@@ -61,6 +63,12 @@ Event::~Event() {
#endif
}
+bool Event::HasNativeEvent() const {
+ base::NativeEvent null_event;
+ std::memset(&null_event, 0, sizeof(null_event));
+ return !!std::memcmp(&native_event_, &null_event, sizeof(null_event));
+}
+
Event::Event(ui::EventType type, int flags)
: type_(type),
time_stamp_(base::Time::NowFromSystemTime()),
@@ -88,7 +96,7 @@ Event::Event(const Event& copy)
}
void Event::Init() {
- memset(&native_event_, 0, sizeof(native_event_));
+ std::memset(&native_event_, 0, sizeof(native_event_));
}
void Event::InitWithNativeEvent(const base::NativeEvent& native_event) {
« no previous file with comments | « ui/aura/event.h ('k') | ui/aura/event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698