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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2556353003: Ensure Char events sent to pepper indicate the correct timestamp seconds. (Closed)
Patch Set: 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..b2351d2e8ab5732e86ecb32cc17c6fbbba437293 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6463,7 +6463,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 =
+ (base::TimeTicks::Now() - base::TimeTicks()).InSecondsF();
majidvp 2016/12/08 20:26:33 nit: Please use ui::EventTimeStampToSeconds to mak
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