OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 432 |
433 BlinkPlatformImpl::~BlinkPlatformImpl() { | 433 BlinkPlatformImpl::~BlinkPlatformImpl() { |
434 } | 434 } |
435 | 435 |
436 WebURLLoader* BlinkPlatformImpl::createURLLoader() { | 436 WebURLLoader* BlinkPlatformImpl::createURLLoader() { |
437 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 437 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
438 // There may be no child thread in RenderViewTests. These tests can still use | 438 // There may be no child thread in RenderViewTests. These tests can still use |
439 // data URLs to bypass the ResourceDispatcher. | 439 // data URLs to bypass the ResourceDispatcher. |
440 return new WebURLLoaderImpl( | 440 return new WebURLLoaderImpl( |
441 child_thread ? child_thread->resource_dispatcher() : NULL, | 441 child_thread ? child_thread->resource_dispatcher() : NULL, |
442 make_scoped_ptr(new scheduler::WebTaskRunnerImpl( | 442 make_scoped_ptr(currentThread()->taskRunner()->clone())); |
443 base::ThreadTaskRunnerHandle::Get()))); | |
444 } | 443 } |
445 | 444 |
446 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() { | 445 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() { |
447 return new WebSocketBridge; | 446 return new WebSocketBridge; |
448 } | 447 } |
449 | 448 |
450 WebString BlinkPlatformImpl::userAgent() { | 449 WebString BlinkPlatformImpl::userAgent() { |
451 CR_DEFINE_STATIC_LOCAL( | 450 CR_DEFINE_STATIC_LOCAL( |
452 blink::WebString, user_agent, | 451 blink::WebString, user_agent, |
453 (blink::WebString::fromUTF8(GetContentClient()->GetUserAgent()))); | 452 (blink::WebString::fromUTF8(GetContentClient()->GetUserAgent()))); |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 1102 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
1104 static_cast<ui::DomKey>(dom_key))); | 1103 static_cast<ui::DomKey>(dom_key))); |
1105 } | 1104 } |
1106 | 1105 |
1107 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 1106 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
1108 return static_cast<int>( | 1107 return static_cast<int>( |
1109 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 1108 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
1110 } | 1109 } |
1111 | 1110 |
1112 } // namespace content | 1111 } // namespace content |
OLD | NEW |