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