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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 537 } |
538 | 538 |
539 blink::WebThread* BlinkPlatformImpl::currentThread() { | 539 blink::WebThread* BlinkPlatformImpl::currentThread() { |
540 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); | 540 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); |
541 } | 541 } |
542 | 542 |
543 void BlinkPlatformImpl::yieldCurrentThread() { | 543 void BlinkPlatformImpl::yieldCurrentThread() { |
544 base::PlatformThread::YieldCurrentThread(); | 544 base::PlatformThread::YieldCurrentThread(); |
545 } | 545 } |
546 | 546 |
547 // TODO(toyoshim): Remove no arguments version after the transition. | |
548 blink::WebWaitableEvent* BlinkPlatformImpl::createWaitableEvent() { | |
549 return new WebWaitableEventImpl( | |
550 blink::WebWaitableEvent::ResetPolicy::Auto, | |
551 blink::WebWaitableEvent::InitialState::NonSignaled); | |
552 } | |
553 | |
554 blink::WebWaitableEvent* BlinkPlatformImpl::createWaitableEvent( | 547 blink::WebWaitableEvent* BlinkPlatformImpl::createWaitableEvent( |
555 blink::WebWaitableEvent::ResetPolicy policy, | 548 blink::WebWaitableEvent::ResetPolicy policy, |
556 blink::WebWaitableEvent::InitialState state) { | 549 blink::WebWaitableEvent::InitialState state) { |
557 return new WebWaitableEventImpl(policy, state); | 550 return new WebWaitableEventImpl(policy, state); |
558 } | 551 } |
559 | 552 |
560 blink::WebWaitableEvent* BlinkPlatformImpl::waitMultipleEvents( | 553 blink::WebWaitableEvent* BlinkPlatformImpl::waitMultipleEvents( |
561 const blink::WebVector<blink::WebWaitableEvent*>& web_events) { | 554 const blink::WebVector<blink::WebWaitableEvent*>& web_events) { |
562 std::vector<base::WaitableEvent*> events; | 555 std::vector<base::WaitableEvent*> events; |
563 for (size_t i = 0; i < web_events.size(); ++i) | 556 for (size_t i = 0; i < web_events.size(); ++i) |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1380 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
1388 static_cast<ui::DomCode>(dom_code))); | 1381 static_cast<ui::DomCode>(dom_code))); |
1389 } | 1382 } |
1390 | 1383 |
1391 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1384 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
1392 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1385 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
1393 code.utf8().data())); | 1386 code.utf8().data())); |
1394 } | 1387 } |
1395 | 1388 |
1396 } // namespace content | 1389 } // namespace content |
OLD | NEW |