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

Unified Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest Created 5 years, 1 month 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 | « content/renderer/renderer_blink_platform_impl.h ('k') | content/test/fake_renderer_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_blink_platform_impl.cc
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 72f09758c34937048cbd7cbe0a1490be24dc265e..7e75ee9a66a668b3dceaa0dc2abe165304d1aa91 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -242,7 +242,8 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl(
plugin_refresh_allowed_(true),
default_task_runner_(renderer_scheduler->DefaultTaskRunner()),
loading_task_runner_(renderer_scheduler->LoadingTaskRunner()),
- web_scrollbar_behavior_(new WebScrollbarBehaviorImpl) {
+ web_scrollbar_behavior_(new WebScrollbarBehaviorImpl),
+ renderer_scheduler_(renderer_scheduler) {
#if !defined(OS_ANDROID) && !defined(OS_WIN)
if (g_sandbox_enabled && sandboxEnabled()) {
sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
@@ -278,6 +279,16 @@ void RendererBlinkPlatformImpl::Shutdown() {
//------------------------------------------------------------------------------
+double RendererBlinkPlatformImpl::currentTimeSeconds() {
+ return renderer_scheduler_->CurrentTimeSeconds();
+}
+
+double RendererBlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() {
+ return renderer_scheduler_->MonotonicallyIncreasingTimeSeconds();
+}
+
+//------------------------------------------------------------------------------
+
blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() {
ChildThreadImpl* child_thread = ChildThreadImpl::current();
// There may be no child thread in RenderViewTests. These tests can still use
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | content/test/fake_renderer_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698