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

Side by Side Diff: content/child/blink_platform_impl.cc

Issue 1108823006: Surfaces system timestamp in the blink platform interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 double BlinkPlatformImpl::currentTime() { 1043 double BlinkPlatformImpl::currentTime() {
1044 return base::Time::Now().ToDoubleT(); 1044 return base::Time::Now().ToDoubleT();
1045 } 1045 }
1046 1046
1047 double BlinkPlatformImpl::monotonicallyIncreasingTime() { 1047 double BlinkPlatformImpl::monotonicallyIncreasingTime() {
1048 return base::TimeTicks::Now().ToInternalValue() / 1048 return base::TimeTicks::Now().ToInternalValue() /
1049 static_cast<double>(base::Time::kMicrosecondsPerSecond); 1049 static_cast<double>(base::Time::kMicrosecondsPerSecond);
1050 } 1050 }
1051 1051
1052 double BlinkPlatformImpl::systemTraceTime() {
1053 return base::TimeTicks::NowFromSystemTraceTime().ToInternalValue() /
1054 static_cast<double>(base::Time::kMicrosecondsPerSecond);
1055 }
1056
1052 void BlinkPlatformImpl::cryptographicallyRandomValues( 1057 void BlinkPlatformImpl::cryptographicallyRandomValues(
1053 unsigned char* buffer, size_t length) { 1058 unsigned char* buffer, size_t length) {
1054 base::RandBytes(buffer, length); 1059 base::RandBytes(buffer, length);
1055 } 1060 }
1056 1061
1057 void BlinkPlatformImpl::setSharedTimerFiredFunction(void (*func)()) { 1062 void BlinkPlatformImpl::setSharedTimerFiredFunction(void (*func)()) {
1058 shared_timer_func_ = func; 1063 shared_timer_func_ = func;
1059 } 1064 }
1060 1065
1061 void BlinkPlatformImpl::setSharedTimerFireInterval( 1066 void BlinkPlatformImpl::setSharedTimerFireInterval(
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( 1340 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString(
1336 static_cast<ui::DomCode>(dom_code))); 1341 static_cast<ui::DomCode>(dom_code)));
1337 } 1342 }
1338 1343
1339 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { 1344 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) {
1340 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( 1345 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode(
1341 code.utf8().data())); 1346 code.utf8().data()));
1342 } 1347 }
1343 1348
1344 } // namespace content 1349 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698