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

Unified Diff: mojo/services/public/cpp/input_events/lib/mojo_extended_key_event_data.h

Issue 476283006: mojo: Fix double character inserts on Windows by removing a Linux hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move input method to its own file. Created 6 years, 4 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
Index: mojo/services/public/cpp/input_events/lib/mojo_extended_key_event_data.h
diff --git a/mojo/services/public/cpp/input_events/lib/mojo_extended_key_event_data.h b/mojo/services/public/cpp/input_events/lib/mojo_extended_key_event_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd5be0f391e62453abce020c2353118eec107c70
--- /dev/null
+++ b/mojo/services/public/cpp/input_events/lib/mojo_extended_key_event_data.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_LIB_MOJO_EXTENDED_KEY_EVENT_DATA_H_
+#define MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_LIB_MOJO_EXTENDED_KEY_EVENT_DATA_H_
+
+#include "ui/events/event.h"
+#include "mojo/services/public/cpp/input_events/mojo_input_events_export.h"
+
+namespace mojo {
+
+// A structure to store all mojo specific data on a KeyEvent.
+class MOJO_INPUT_EVENTS_EXPORT MojoExtendedKeyEventData
+ : public ui::ExtendedKeyEventData {
+ public:
+ MojoExtendedKeyEventData(int32_t windows_key_code,
+ uint16_t text,
+ uint16_t unmodified_text);
+ virtual ~MojoExtendedKeyEventData();
+
+ int32_t windows_key_code() const { return windows_key_code_; }
+ uint16_t text() const { return text_; }
+ uint16_t unmodified_text() const { return unmodified_text_; }
+
+ // ui::ExtendedKeyEventData:
+ virtual ui::ExtendedKeyEventData* Clone() const OVERRIDE;
+
+ private:
+ const int32_t windows_key_code_;
+ const uint16_t text_;
+ const uint16_t unmodified_text_;
+
+ DISALLOW_COPY_AND_ASSIGN(MojoExtendedKeyEventData);
+};
+
+} // namespace mojo
+
+#endif // MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_LIB_MOJO_EXTENDED_KEY_EVENT_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698