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

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: review fixes 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
Index: ui/aura/event.cc
diff --git a/ui/aura/event.cc b/ui/aura/event.cc
index 5cb2fd8f1f756f819cd9f1c9a29e550c2dde013a..3348b3f0336111c1ea7e259bed22724d8f99a382 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"
@@ -78,7 +80,13 @@ Event::Event(const Event& copy)
}
void Event::Init() {
- memset(&native_event_, 0, sizeof(native_event_));
+ std::memset(&native_event_, 0, sizeof(native_event_));
+}
+
+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));
}
void Event::InitWithNativeEvent(const base::NativeEvent& native_event) {

Powered by Google App Engine
This is Rietveld 408576698