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 <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 } | 380 } |
381 | 381 |
382 void BlinkPlatformImpl::InternalInit() { | 382 void BlinkPlatformImpl::InternalInit() { |
383 // ChildThread may not exist in some tests. | 383 // ChildThread may not exist in some tests. |
384 if (ChildThreadImpl::current()) { | 384 if (ChildThreadImpl::current()) { |
385 thread_safe_sender_ = ChildThreadImpl::current()->thread_safe_sender(); | 385 thread_safe_sender_ = ChildThreadImpl::current()->thread_safe_sender(); |
386 notification_dispatcher_ = | 386 notification_dispatcher_ = |
387 ChildThreadImpl::current()->notification_dispatcher(); | 387 ChildThreadImpl::current()->notification_dispatcher(); |
388 push_dispatcher_ = ChildThreadImpl::current()->push_dispatcher(); | 388 push_dispatcher_ = ChildThreadImpl::current()->push_dispatcher(); |
389 permission_client_.reset(new PermissionDispatcher( | 389 permission_client_.reset(new PermissionDispatcher( |
390 ChildThreadImpl::current()->remote_interfaces())); | 390 ChildThreadImpl::current()->GetRemoteInterfaces())); |
391 main_thread_sync_provider_.reset( | 391 main_thread_sync_provider_.reset( |
392 new BackgroundSyncProvider(main_thread_task_runner_.get())); | 392 new BackgroundSyncProvider(main_thread_task_runner_.get())); |
393 } | 393 } |
394 } | 394 } |
395 | 395 |
396 void BlinkPlatformImpl::WaitUntilWebThreadTLSUpdate( | 396 void BlinkPlatformImpl::WaitUntilWebThreadTLSUpdate( |
397 scheduler::WebThreadBase* thread) { | 397 scheduler::WebThreadBase* thread) { |
398 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC, | 398 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
399 base::WaitableEvent::InitialState::NOT_SIGNALED); | 399 base::WaitableEvent::InitialState::NOT_SIGNALED); |
400 thread->GetTaskRunner()->PostTask( | 400 thread->GetTaskRunner()->PostTask( |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 1000 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
1001 static_cast<ui::DomKey>(dom_key))); | 1001 static_cast<ui::DomKey>(dom_key))); |
1002 } | 1002 } |
1003 | 1003 |
1004 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 1004 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
1005 return static_cast<int>( | 1005 return static_cast<int>( |
1006 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 1006 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
1007 } | 1007 } |
1008 | 1008 |
1009 } // namespace content | 1009 } // namespace content |
OLD | NEW |