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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/compositorworker/CompositorWorkerGlobalScope.h" 5 #include "modules/compositorworker/CompositorWorkerGlobalScope.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/SerializedScriptValue.h" 9 #include "bindings/core/v8/SerializedScriptValue.h"
10 #include "core/dom/CompositorWorkerProxyClient.h" 10 #include "core/dom/CompositorWorkerProxyClient.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const AtomicString& CompositorWorkerGlobalScope::interfaceName() const { 67 const AtomicString& CompositorWorkerGlobalScope::interfaceName() const {
68 return EventTargetNames::CompositorWorkerGlobalScope; 68 return EventTargetNames::CompositorWorkerGlobalScope;
69 } 69 }
70 70
71 void CompositorWorkerGlobalScope::postMessage( 71 void CompositorWorkerGlobalScope::postMessage(
72 ScriptState* scriptState, 72 ScriptState* scriptState,
73 PassRefPtr<SerializedScriptValue> message, 73 PassRefPtr<SerializedScriptValue> message,
74 const MessagePortArray& ports, 74 const MessagePortArray& ports,
75 ExceptionState& exceptionState) { 75 ExceptionState& exceptionState) {
76 // Disentangle the port in preparation for sending it to the remote context. 76 // Disentangle the port in preparation for sending it to the remote context.
77 MessagePortChannelArray channels = 77 MessagePortChannelArray channels = MessagePort::disentanglePorts(
78 MessagePort::disentanglePorts(scriptState->getExecutionContext(), ports, 78 scriptState->getExecutionContext(), ports, exceptionState);
79 exceptionState);
80 if (exceptionState.hadException()) 79 if (exceptionState.hadException())
81 return; 80 return;
82 workerObjectProxy().postMessageToWorkerObject(std::move(message), 81 workerObjectProxy().postMessageToWorkerObject(std::move(message),
83 std::move(channels)); 82 std::move(channels));
84 } 83 }
85 84
86 int CompositorWorkerGlobalScope::requestAnimationFrame( 85 int CompositorWorkerGlobalScope::requestAnimationFrame(
87 FrameRequestCallback* callback) { 86 FrameRequestCallback* callback) {
88 const bool shouldSignal = 87 const bool shouldSignal =
89 !m_executingAnimationFrameCallbacks && m_callbackCollection.isEmpty(); 88 !m_executingAnimationFrameCallbacks && m_callbackCollection.isEmpty();
(...skipping 12 matching lines...) Expand all
102 m_callbackCollection.executeCallbacks(highResTimeMs, highResTimeMs); 101 m_callbackCollection.executeCallbacks(highResTimeMs, highResTimeMs);
103 return !m_callbackCollection.isEmpty(); 102 return !m_callbackCollection.isEmpty();
104 } 103 }
105 104
106 InProcessWorkerObjectProxy& CompositorWorkerGlobalScope::workerObjectProxy() 105 InProcessWorkerObjectProxy& CompositorWorkerGlobalScope::workerObjectProxy()
107 const { 106 const {
108 return static_cast<CompositorWorkerThread*>(thread())->workerObjectProxy(); 107 return static_cast<CompositorWorkerThread*>(thread())->workerObjectProxy();
109 } 108 }
110 109
111 } // namespace blink 110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698