Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: content/child/blink_platform_impl.cc

Issue 1675633002: WebTaskRunnerImpl to take a TaskQueue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698