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

Unified Diff: content/browser/renderer_host/native_web_keyboard_event_android.cc

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Fix mouse up event sender not modifying modifiers Created 4 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: content/browser/renderer_host/native_web_keyboard_event_android.cc
diff --git a/content/browser/renderer_host/native_web_keyboard_event_android.cc b/content/browser/renderer_host/native_web_keyboard_event_android.cc
index 94f3a4ac0be0ed69b6464a0c3b9ae309d5f3992f..bea32063a3ba10afd88f4e08270eccdf2ad28574 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_android.cc
+++ b/content/browser/renderer_host/native_web_keyboard_event_android.cc
@@ -6,6 +6,7 @@
#include "base/android/jni_android.h"
#include "content/browser/renderer_host/input/web_input_event_builders_android.h"
+#include "ui/events/base_event_utils.h"
#include "ui/gfx/native_widget_types.h"
namespace {
@@ -24,10 +25,19 @@ void DeleteGlobalRefForKeyEvent(jobject key_event) {
namespace content {
-NativeWebKeyboardEvent::NativeWebKeyboardEvent()
- : os_event(nullptr),
- skip_in_browser(false) {
-}
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(blink::WebInputEvent::Type type,
+ int modifiers,
+ base::TimeTicks timestamp)
+ : NativeWebKeyboardEvent(type,
+ modifiers,
+ ui::EventTimeStampToSeconds(timestamp)) {}
+
+NativeWebKeyboardEvent::NativeWebKeyboardEvent(blink::WebInputEvent::Type type,
+ int modifiers,
+ double timestampSeconds)
+ : WebKeyboardEvent(type, modifiers, timestampSeconds),
+ os_event(NULL),
majidvp 2016/12/19 20:09:52 s/NULL/nullptr/
dtapuska 2016/12/20 19:49:21 Done.
+ skip_in_browser(false) {}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(
JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698