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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // SandboxSupport contains a map of WebFontFamily objects, which hold | 303 // SandboxSupport contains a map of WebFontFamily objects, which hold |
304 // WebCStrings, which become invalidated when blink is shut down. Hence, we | 304 // WebCStrings, which become invalidated when blink is shut down. Hence, we |
305 // need to clear that map now, just before blink::shutdown() is called. | 305 // need to clear that map now, just before blink::shutdown() is called. |
306 sandbox_support_.reset(); | 306 sandbox_support_.reset(); |
307 #endif | 307 #endif |
308 } | 308 } |
309 | 309 |
310 //------------------------------------------------------------------------------ | 310 //------------------------------------------------------------------------------ |
311 | 311 |
312 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { | 312 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { |
| 313 if (!url_loader_factory_) |
| 314 interfaceProvider()->getInterface(mojo::GetProxy(&url_loader_factory_)); |
313 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 315 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
314 // There may be no child thread in RenderViewTests. These tests can still use | 316 // There may be no child thread in RenderViewTests. These tests can still use |
315 // data URLs to bypass the ResourceDispatcher. | 317 // data URLs to bypass the ResourceDispatcher. |
316 return new content::WebURLLoaderImpl( | 318 return new content::WebURLLoaderImpl( |
317 child_thread ? child_thread->resource_dispatcher() : NULL, | 319 child_thread ? child_thread->resource_dispatcher() : NULL, |
318 currentThread()->getWebTaskRunner()->clone()); | 320 currentThread()->getWebTaskRunner()->clone(), url_loader_factory_.get()); |
319 } | 321 } |
320 | 322 |
321 blink::WebThread* RendererBlinkPlatformImpl::currentThread() { | 323 blink::WebThread* RendererBlinkPlatformImpl::currentThread() { |
322 if (main_thread_->isCurrentThread()) | 324 if (main_thread_->isCurrentThread()) |
323 return main_thread_.get(); | 325 return main_thread_.get(); |
324 return BlinkPlatformImpl::currentThread(); | 326 return BlinkPlatformImpl::currentThread(); |
325 } | 327 } |
326 | 328 |
327 blink::BlameContext* RendererBlinkPlatformImpl::topLevelBlameContext() { | 329 blink::BlameContext* RendererBlinkPlatformImpl::topLevelBlameContext() { |
328 return &top_level_blame_context_; | 330 return &top_level_blame_context_; |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 return &trial_token_validator_; | 1318 return &trial_token_validator_; |
1317 } | 1319 } |
1318 | 1320 |
1319 void RendererBlinkPlatformImpl::workerContextCreated( | 1321 void RendererBlinkPlatformImpl::workerContextCreated( |
1320 const v8::Local<v8::Context>& worker) { | 1322 const v8::Local<v8::Context>& worker) { |
1321 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1323 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
1322 worker); | 1324 worker); |
1323 } | 1325 } |
1324 | 1326 |
1325 } // namespace content | 1327 } // namespace content |
OLD | NEW |