| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 460 |
| 461 bool BlinkPlatformImpl::portAllowed(const blink::WebURL& url) const { | 461 bool BlinkPlatformImpl::portAllowed(const blink::WebURL& url) const { |
| 462 GURL gurl = GURL(url); | 462 GURL gurl = GURL(url); |
| 463 // Return true for URLs without a port specified. This is needed to let | 463 // Return true for URLs without a port specified. This is needed to let |
| 464 // through non-network schemes that don't go over the network. | 464 // through non-network schemes that don't go over the network. |
| 465 if (!gurl.has_port()) | 465 if (!gurl.has_port()) |
| 466 return true; | 466 return true; |
| 467 return net::IsPortAllowedForScheme(gurl.EffectiveIntPort(), gurl.scheme()); | 467 return net::IsPortAllowedForScheme(gurl.EffectiveIntPort(), gurl.scheme()); |
| 468 } | 468 } |
| 469 | 469 |
| 470 bool BlinkPlatformImpl::parseMultipartHeadersFromBody( |
| 471 const char* bytes, |
| 472 size_t size, |
| 473 blink::WebURLResponse* response, |
| 474 size_t* end) const { |
| 475 return WebURLLoaderImpl::ParseMultipartHeadersFromBody( |
| 476 bytes, size, response, end); |
| 477 } |
| 478 |
| 470 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { | 479 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { |
| 471 scoped_ptr<WebThreadImplForWorkerScheduler> thread( | 480 scoped_ptr<WebThreadImplForWorkerScheduler> thread( |
| 472 new WebThreadImplForWorkerScheduler(name)); | 481 new WebThreadImplForWorkerScheduler(name)); |
| 473 thread->Init(); | 482 thread->Init(); |
| 474 WaitUntilWebThreadTLSUpdate(thread.get()); | 483 WaitUntilWebThreadTLSUpdate(thread.get()); |
| 475 return thread.release(); | 484 return thread.release(); |
| 476 } | 485 } |
| 477 | 486 |
| 478 void BlinkPlatformImpl::SetCompositorThread( | 487 void BlinkPlatformImpl::SetCompositorThread( |
| 479 scheduler::WebThreadBase* compositor_thread) { | 488 scheduler::WebThreadBase* compositor_thread) { |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 1026 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
| 1018 static_cast<ui::DomKey>(dom_key))); | 1027 static_cast<ui::DomKey>(dom_key))); |
| 1019 } | 1028 } |
| 1020 | 1029 |
| 1021 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 1030 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
| 1022 return static_cast<int>( | 1031 return static_cast<int>( |
| 1023 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 1032 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
| 1024 } | 1033 } |
| 1025 | 1034 |
| 1026 } // namespace content | 1035 } // namespace content |
| OLD | NEW |