OLD | NEW |
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::currentTimeSeconds() { |
291 return renderer_scheduler_->CurrentTimeSeconds(); | 291 // TODO(alexclarke): Change the way this is plumbed through to blink. |
| 292 return renderer_scheduler_->VirtualTimeSeconds(); |
292 } | 293 } |
293 | 294 |
294 double RendererBlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { | 295 double RendererBlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { |
295 return renderer_scheduler_->MonotonicallyIncreasingTimeSeconds(); | 296 // TODO(alexclarke): Change the way this is plumbed through to blink. |
| 297 return renderer_scheduler_->MonotonicallyIncreasingVirtualTimeSeconds(); |
296 } | 298 } |
297 | 299 |
298 //------------------------------------------------------------------------------ | 300 //------------------------------------------------------------------------------ |
299 | 301 |
300 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { | 302 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { |
301 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 303 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
302 // There may be no child thread in RenderViewTests. These tests can still use | 304 // There may be no child thread in RenderViewTests. These tests can still use |
303 // data URLs to bypass the ResourceDispatcher. | 305 // data URLs to bypass the ResourceDispatcher. |
304 scoped_ptr<scheduler::WebTaskRunnerImpl> task_runner( | 306 scoped_ptr<scheduler::WebTaskRunnerImpl> task_runner( |
305 new scheduler::WebTaskRunnerImpl( | 307 new scheduler::WebTaskRunnerImpl( |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 //------------------------------------------------------------------------------ | 1300 //------------------------------------------------------------------------------ |
1299 | 1301 |
1300 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1302 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
1301 const blink::WebBatteryStatus& status) { | 1303 const blink::WebBatteryStatus& status) { |
1302 if (!g_test_battery_status_listener) | 1304 if (!g_test_battery_status_listener) |
1303 return; | 1305 return; |
1304 g_test_battery_status_listener->updateBatteryStatus(status); | 1306 g_test_battery_status_listener->updateBatteryStatus(status); |
1305 } | 1307 } |
1306 | 1308 |
1307 } // namespace content | 1309 } // namespace content |
OLD | NEW |