| 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 "modules/presentation/PresentationConnection.h" | 5 #include "modules/presentation/PresentationConnection.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "core/dom/DOMArrayBuffer.h" | 8 #include "core/dom/DOMArrayBuffer.h" |
| 9 #include "core/dom/DOMArrayBufferView.h" | 9 #include "core/dom/DOMArrayBufferView.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionTerminateEventListener); | 195 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionTerminateEventListener); |
| 196 else if (eventType == EventTypeNames::message) | 196 else if (eventType == EventTypeNames::message) |
| 197 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionMessageEventListener); | 197 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionMessageEventListener); |
| 198 | 198 |
| 199 return EventTarget::addEventListenerInternal(eventType, listener, options); | 199 return EventTarget::addEventListenerInternal(eventType, listener, options); |
| 200 } | 200 } |
| 201 | 201 |
| 202 DEFINE_TRACE(PresentationConnection) | 202 DEFINE_TRACE(PresentationConnection) |
| 203 { | 203 { |
| 204 visitor->trace(m_blobLoader); | 204 visitor->trace(m_blobLoader); |
| 205 RefCountedGarbageCollectedEventTargetWithInlineData<PresentationConnection>:
:trace(visitor); | 205 EventTargetWithInlineData<PresentationConnection>::trace(visitor); |
| 206 DOMWindowProperty::trace(visitor); | 206 DOMWindowProperty::trace(visitor); |
| 207 } | 207 } |
| 208 | 208 |
| 209 const AtomicString& PresentationConnection::state() const | 209 const AtomicString& PresentationConnection::state() const |
| 210 { | 210 { |
| 211 return connectionStateToString(m_state); | 211 return connectionStateToString(m_state); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void PresentationConnection::send(const String& message, ExceptionState& excepti
onState) | 214 void PresentationConnection::send(const String& message, ExceptionState& excepti
onState) |
| 215 { | 215 { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 m_blobLoader->cancel(); | 428 m_blobLoader->cancel(); |
| 429 m_blobLoader.clear(); | 429 m_blobLoader.clear(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 // Clear message queue. | 432 // Clear message queue. |
| 433 Deque<OwnPtr<Message>> empty; | 433 Deque<OwnPtr<Message>> empty; |
| 434 m_messages.swap(empty); | 434 m_messages.swap(empty); |
| 435 } | 435 } |
| 436 | 436 |
| 437 } // namespace blink | 437 } // namespace blink |
| OLD | NEW |