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

Unified Diff: content/browser/renderer_host/native_web_keyboard_event_mac.mm

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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: content/browser/renderer_host/native_web_keyboard_event_mac.mm
diff --git a/content/browser/renderer_host/native_web_keyboard_event_mac.mm b/content/browser/renderer_host/native_web_keyboard_event_mac.mm
index beed79ae54f8d8cffb5bf62f7c262f5b27dc32b0..9740bd65ee7977cd19132c23199fa20f2a4f6cca 100644
--- a/content/browser/renderer_host/native_web_keyboard_event_mac.mm
+++ b/content/browser/renderer_host/native_web_keyboard_event_mac.mm
@@ -7,14 +7,24 @@
#import <AppKit/AppKit.h>
#include "content/browser/renderer_host/input/web_input_event_builders_mac.h"
+#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
namespace content {
-NativeWebKeyboardEvent::NativeWebKeyboardEvent()
- : os_event(NULL),
- 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),
+ skip_in_browser(false) {}
NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event)
: WebKeyboardEvent(WebKeyboardEventBuilder::Build(native_event)),

Powered by Google App Engine
This is Rietveld 408576698