| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 481 |
| 482 BlinkPlatformImpl::~BlinkPlatformImpl() { | 482 BlinkPlatformImpl::~BlinkPlatformImpl() { |
| 483 } | 483 } |
| 484 | 484 |
| 485 WebURLLoader* BlinkPlatformImpl::createURLLoader() { | 485 WebURLLoader* BlinkPlatformImpl::createURLLoader() { |
| 486 ChildThreadImpl* child_thread = ChildThreadImpl::current(); | 486 ChildThreadImpl* child_thread = ChildThreadImpl::current(); |
| 487 // There may be no child thread in RenderViewTests. These tests can still use | 487 // There may be no child thread in RenderViewTests. These tests can still use |
| 488 // data URLs to bypass the ResourceDispatcher. | 488 // data URLs to bypass the ResourceDispatcher. |
| 489 return new WebURLLoaderImpl( | 489 return new WebURLLoaderImpl( |
| 490 child_thread ? child_thread->resource_dispatcher() : NULL, | 490 child_thread ? child_thread->resource_dispatcher() : NULL, |
| 491 make_scoped_ptr(new scheduler::WebTaskRunnerImpl( | 491 make_scoped_ptr(currentThread()->taskRunner()->clone())); |
| 492 base::ThreadTaskRunnerHandle::Get()))); | |
| 493 } | 492 } |
| 494 | 493 |
| 495 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() { | 494 blink::WebSocketHandle* BlinkPlatformImpl::createWebSocketHandle() { |
| 496 return new WebSocketBridge; | 495 return new WebSocketBridge; |
| 497 } | 496 } |
| 498 | 497 |
| 499 WebString BlinkPlatformImpl::userAgent() { | 498 WebString BlinkPlatformImpl::userAgent() { |
| 500 CR_DEFINE_STATIC_LOCAL( | 499 CR_DEFINE_STATIC_LOCAL( |
| 501 blink::WebString, user_agent, | 500 blink::WebString, user_agent, |
| 502 (blink::WebString::fromUTF8(GetContentClient()->GetUserAgent()))); | 501 (blink::WebString::fromUTF8(GetContentClient()->GetUserAgent()))); |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 1197 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
| 1199 static_cast<ui::DomKey>(dom_key))); | 1198 static_cast<ui::DomKey>(dom_key))); |
| 1200 } | 1199 } |
| 1201 | 1200 |
| 1202 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 1201 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
| 1203 return static_cast<int>( | 1202 return static_cast<int>( |
| 1204 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 1203 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
| 1205 } | 1204 } |
| 1206 | 1205 |
| 1207 } // namespace content | 1206 } // namespace content |
| OLD | NEW |