OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/workers/ThreadedObjectProxyBase.h" | 5 #include "core/workers/ThreadedObjectProxyBase.h" |
6 | 6 |
7 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
8 #include "core/inspector/ConsoleMessage.h" | 8 #include "core/inspector/ConsoleMessage.h" |
9 #include "core/workers/ParentFrameTaskRunners.h" | 9 #include "core/workers/ParentFrameTaskRunners.h" |
10 #include "core/workers/ThreadedMessagingProxyBase.h" | 10 #include "core/workers/ThreadedMessagingProxyBase.h" |
11 #include "platform/CrossThreadFunctional.h" | 11 #include "platform/CrossThreadFunctional.h" |
12 #include "platform/WebTaskRunner.h" | 12 #include "platform/WebTaskRunner.h" |
13 #include "wtf/Functional.h" | 13 #include "wtf/Functional.h" |
14 #include "wtf/PtrUtil.h" | 14 #include "wtf/PtrUtil.h" |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
| 19 void ThreadedObjectProxyBase::countFeature(UseCounter::Feature feature) { |
| 20 getParentFrameTaskRunners() |
| 21 ->get(TaskType::Internal) |
| 22 ->postTask(BLINK_FROM_HERE, |
| 23 crossThreadBind(&ThreadedMessagingProxyBase::countFeature, |
| 24 messagingProxyWeakPtr(), feature)); |
| 25 } |
| 26 |
| 27 void ThreadedObjectProxyBase::countDeprecation(UseCounter::Feature feature) { |
| 28 getParentFrameTaskRunners() |
| 29 ->get(TaskType::Internal) |
| 30 ->postTask(BLINK_FROM_HERE, |
| 31 crossThreadBind(&ThreadedMessagingProxyBase::countDeprecation, |
| 32 messagingProxyWeakPtr(), feature)); |
| 33 } |
| 34 |
19 void ThreadedObjectProxyBase::reportConsoleMessage(MessageSource source, | 35 void ThreadedObjectProxyBase::reportConsoleMessage(MessageSource source, |
20 MessageLevel level, | 36 MessageLevel level, |
21 const String& message, | 37 const String& message, |
22 SourceLocation* location) { | 38 SourceLocation* location) { |
23 getParentFrameTaskRunners() | 39 getParentFrameTaskRunners() |
24 ->get(TaskType::Internal) | 40 ->get(TaskType::Internal) |
25 ->postTask( | 41 ->postTask( |
26 BLINK_FROM_HERE, | 42 BLINK_FROM_HERE, |
27 crossThreadBind(&ThreadedMessagingProxyBase::reportConsoleMessage, | 43 crossThreadBind(&ThreadedMessagingProxyBase::reportConsoleMessage, |
28 messagingProxyWeakPtr(), source, level, message, | 44 messagingProxyWeakPtr(), source, level, message, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 BLINK_FROM_HERE, | 78 BLINK_FROM_HERE, |
63 crossThreadBind(&ThreadedMessagingProxyBase::workerThreadTerminated, | 79 crossThreadBind(&ThreadedMessagingProxyBase::workerThreadTerminated, |
64 messagingProxyWeakPtr())); | 80 messagingProxyWeakPtr())); |
65 } | 81 } |
66 | 82 |
67 ThreadedObjectProxyBase::ThreadedObjectProxyBase( | 83 ThreadedObjectProxyBase::ThreadedObjectProxyBase( |
68 ParentFrameTaskRunners* parentFrameTaskRunners) | 84 ParentFrameTaskRunners* parentFrameTaskRunners) |
69 : m_parentFrameTaskRunners(parentFrameTaskRunners) {} | 85 : m_parentFrameTaskRunners(parentFrameTaskRunners) {} |
70 | 86 |
71 } // namespace blink | 87 } // namespace blink |
OLD | NEW |