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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 #if !defined(OS_ANDROID) && !defined(OS_WIN) | 274 #if !defined(OS_ANDROID) && !defined(OS_WIN) |
275 // SandboxSupport contains a map of WebFontFamily objects, which hold | 275 // SandboxSupport contains a map of WebFontFamily objects, which hold |
276 // WebCStrings, which become invalidated when blink is shut down. Hence, we | 276 // WebCStrings, which become invalidated when blink is shut down. Hence, we |
277 // need to clear that map now, just before blink::shutdown() is called. | 277 // need to clear that map now, just before blink::shutdown() is called. |
278 sandbox_support_.reset(); | 278 sandbox_support_.reset(); |
279 #endif | 279 #endif |
280 } | 280 } |
281 | 281 |
282 //------------------------------------------------------------------------------ | 282 //------------------------------------------------------------------------------ |
283 | 283 |
284 double RendererBlinkPlatformImpl::currentTimeSeconds() { | |
285 return renderer_scheduler_->CurrentTimeSeconds(); | |
286 } | |
287 | |
288 double RendererBlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { | |
289 return renderer_scheduler_->MonotonicallyIncreasingTimeSeconds(); | |
esprehn
2016/01/05 07:01:09
The scheduler implements virtual time, where is th
Yuta Kitamura
2016/01/05 09:17:46
Good point. This was my oversight, but after looki
alex clarke (OOO till 29th)
2016/01/05 10:49:24
This is for Headless Chrome (https://docs.google.c
| |
290 } | |
291 | |
292 //------------------------------------------------------------------------------ | |
293 | |
294 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { | 284 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { |
295 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 285 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
296 // There may be no child thread in RenderViewTests. These tests can still use | 286 // There may be no child thread in RenderViewTests. These tests can still use |
297 // data URLs to bypass the ResourceDispatcher. | 287 // data URLs to bypass the ResourceDispatcher. |
298 scoped_ptr<scheduler::WebTaskRunnerImpl> task_runner( | 288 scoped_ptr<scheduler::WebTaskRunnerImpl> task_runner( |
299 new scheduler::WebTaskRunnerImpl( | 289 new scheduler::WebTaskRunnerImpl( |
300 loading_task_runner_->BelongsToCurrentThread() | 290 loading_task_runner_->BelongsToCurrentThread() |
301 ? loading_task_runner_ : base::ThreadTaskRunnerHandle::Get())); | 291 ? loading_task_runner_ : base::ThreadTaskRunnerHandle::Get())); |
302 return new content::WebURLLoaderImpl( | 292 return new content::WebURLLoaderImpl( |
303 child_thread ? child_thread->resource_dispatcher() : NULL, | 293 child_thread ? child_thread->resource_dispatcher() : NULL, |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1288 //------------------------------------------------------------------------------ | 1278 //------------------------------------------------------------------------------ |
1289 | 1279 |
1290 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1280 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
1291 const blink::WebBatteryStatus& status) { | 1281 const blink::WebBatteryStatus& status) { |
1292 if (!g_test_battery_status_listener) | 1282 if (!g_test_battery_status_listener) |
1293 return; | 1283 return; |
1294 g_test_battery_status_listener->updateBatteryStatus(status); | 1284 g_test_battery_status_listener->updateBatteryStatus(status); |
1295 } | 1285 } |
1296 | 1286 |
1297 } // namespace content | 1287 } // namespace content |
OLD | NEW |