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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1646583002: [Reland] Per WebViewScheduler virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try to fix the broken tests Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 #if !defined(OS_ANDROID) && !defined(OS_WIN) 280 #if !defined(OS_ANDROID) && !defined(OS_WIN)
281 // SandboxSupport contains a map of WebFontFamily objects, which hold 281 // SandboxSupport contains a map of WebFontFamily objects, which hold
282 // WebCStrings, which become invalidated when blink is shut down. Hence, we 282 // WebCStrings, which become invalidated when blink is shut down. Hence, we
283 // need to clear that map now, just before blink::shutdown() is called. 283 // need to clear that map now, just before blink::shutdown() is called.
284 sandbox_support_.reset(); 284 sandbox_support_.reset();
285 #endif 285 #endif
286 } 286 }
287 287
288 //------------------------------------------------------------------------------ 288 //------------------------------------------------------------------------------
289 289
290 double RendererBlinkPlatformImpl::currentTimeSeconds() { 290 double RendererBlinkPlatformImpl::virtualTimeSeconds() {
291 // TODO(alexclarke): Change the way this is plumbed through to blink.
292 return renderer_scheduler_->VirtualTimeSeconds(); 291 return renderer_scheduler_->VirtualTimeSeconds();
293 } 292 }
294 293
295 double RendererBlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { 294 double RendererBlinkPlatformImpl::monotonicallyIncreasingVirtualTimeSeconds() {
296 // TODO(alexclarke): Change the way this is plumbed through to blink.
297 return renderer_scheduler_->MonotonicallyIncreasingVirtualTimeSeconds(); 295 return renderer_scheduler_->MonotonicallyIncreasingVirtualTimeSeconds();
298 } 296 }
299 297
300 //------------------------------------------------------------------------------ 298 //------------------------------------------------------------------------------
301 299
302 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { 300 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() {
303 ChildThreadImpl* child_thread = ChildThreadImpl::current(); 301 ChildThreadImpl* child_thread = ChildThreadImpl::current();
304 // There may be no child thread in RenderViewTests. These tests can still use 302 // There may be no child thread in RenderViewTests. These tests can still use
305 // data URLs to bypass the ResourceDispatcher. 303 // data URLs to bypass the ResourceDispatcher.
306 scoped_ptr<scheduler::WebTaskRunnerImpl> task_runner( 304 scoped_ptr<scheduler::WebTaskRunnerImpl> task_runner(
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 //------------------------------------------------------------------------------ 1298 //------------------------------------------------------------------------------
1301 1299
1302 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1300 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1303 const blink::WebBatteryStatus& status) { 1301 const blink::WebBatteryStatus& status) {
1304 if (!g_test_battery_status_listener) 1302 if (!g_test_battery_status_listener)
1305 return; 1303 return;
1306 g_test_battery_status_listener->updateBatteryStatus(status); 1304 g_test_battery_status_listener->updateBatteryStatus(status);
1307 } 1305 }
1308 1306
1309 } // namespace content 1307 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698