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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // SandboxSupport contains a map of WebFontFamily objects, which hold | 290 // SandboxSupport contains a map of WebFontFamily objects, which hold |
291 // WebCStrings, which become invalidated when blink is shut down. Hence, we | 291 // WebCStrings, which become invalidated when blink is shut down. Hence, we |
292 // need to clear that map now, just before blink::shutdown() is called. | 292 // need to clear that map now, just before blink::shutdown() is called. |
293 sandbox_support_.reset(); | 293 sandbox_support_.reset(); |
294 #endif | 294 #endif |
295 } | 295 } |
296 | 296 |
297 //------------------------------------------------------------------------------ | 297 //------------------------------------------------------------------------------ |
298 | 298 |
299 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { | 299 blink::WebURLLoader* RendererBlinkPlatformImpl::createURLLoader() { |
| 300 if (!url_loader_factory_) { |
| 301 serviceRegistry()->connectToRemoteService( |
| 302 mojo::GetProxy(&url_loader_factory_)); |
| 303 } |
300 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 304 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
301 // There may be no child thread in RenderViewTests. These tests can still use | 305 // There may be no child thread in RenderViewTests. These tests can still use |
302 // data URLs to bypass the ResourceDispatcher. | 306 // data URLs to bypass the ResourceDispatcher. |
303 return new content::WebURLLoaderImpl( | 307 return new content::WebURLLoaderImpl( |
304 child_thread ? child_thread->resource_dispatcher() : NULL, | 308 child_thread ? child_thread->resource_dispatcher() : NULL, |
305 base::WrapUnique(currentThread()->getWebTaskRunner()->clone())); | 309 base::WrapUnique(currentThread()->getWebTaskRunner()->clone()), |
| 310 url_loader_factory_.get()); |
306 } | 311 } |
307 | 312 |
308 blink::WebThread* RendererBlinkPlatformImpl::currentThread() { | 313 blink::WebThread* RendererBlinkPlatformImpl::currentThread() { |
309 if (main_thread_->isCurrentThread()) | 314 if (main_thread_->isCurrentThread()) |
310 return main_thread_.get(); | 315 return main_thread_.get(); |
311 return BlinkPlatformImpl::currentThread(); | 316 return BlinkPlatformImpl::currentThread(); |
312 } | 317 } |
313 | 318 |
314 blink::BlameContext* RendererBlinkPlatformImpl::topLevelBlameContext() { | 319 blink::BlameContext* RendererBlinkPlatformImpl::topLevelBlameContext() { |
315 return &top_level_blame_context_; | 320 return &top_level_blame_context_; |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 return &trial_token_validator_; | 1312 return &trial_token_validator_; |
1308 } | 1313 } |
1309 | 1314 |
1310 void RendererBlinkPlatformImpl::workerContextCreated( | 1315 void RendererBlinkPlatformImpl::workerContextCreated( |
1311 const v8::Local<v8::Context>& worker) { | 1316 const v8::Local<v8::Context>& worker) { |
1312 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1317 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
1313 worker); | 1318 worker); |
1314 } | 1319 } |
1315 | 1320 |
1316 } // namespace content | 1321 } // namespace content |
OLD | NEW |