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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2556353003: Ensure Char events sent to pepper indicate the correct timestamp seconds. (Closed)
Patch Set: Use alternate API 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f68bb2e5666f71404361907fd889992464b5d5cf..9f51a191d50e53e5af5e52b7525c6c78a9581196 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -207,6 +207,7 @@
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/WebKit/public/web/WebWidget.h"
+#include "ui/events/base_event_utils.h"
#include "url/origin.h"
#include "url/url_constants.h"
#include "url/url_util.h"
@@ -6463,7 +6464,8 @@ void RenderFrameImpl::HandlePepperImeCommit(const base::string16& text) {
while (iterator.Advance()) {
blink::WebKeyboardEvent char_event;
char_event.type = blink::WebInputEvent::Char;
- char_event.timeStampSeconds = base::Time::Now().ToDoubleT();
+ char_event.timeStampSeconds =
+ ui::EventTimeStampToSeconds(ui::EventTimeForNow());
char_event.modifiers = 0;
char_event.windowsKeyCode = text[i];
char_event.nativeKeyCode = text[i];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698