| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return EventTargetNames::PresentationConnection; | 176 return EventTargetNames::PresentationConnection; |
| 177 } | 177 } |
| 178 | 178 |
| 179 ExecutionContext* PresentationConnection::getExecutionContext() const | 179 ExecutionContext* PresentationConnection::getExecutionContext() const |
| 180 { | 180 { |
| 181 if (!frame()) | 181 if (!frame()) |
| 182 return nullptr; | 182 return nullptr; |
| 183 return frame()->document(); | 183 return frame()->document(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 bool PresentationConnection::addEventListenerInternal(const AtomicString& eventT
ype, PassRefPtrWillBeRawPtr<EventListener> listener, const EventListenerOptions&
options) | 186 bool PresentationConnection::addEventListenerInternal(const AtomicString& eventT
ype, RawPtr<EventListener> listener, const EventListenerOptions& options) |
| 187 { | 187 { |
| 188 if (eventType == EventTypeNames::statechange) | 188 if (eventType == EventTypeNames::statechange) |
| 189 Deprecation::countDeprecation(getExecutionContext(), UseCounter::Present
ationConnectionStateChangeEventListener); | 189 Deprecation::countDeprecation(getExecutionContext(), UseCounter::Present
ationConnectionStateChangeEventListener); |
| 190 else if (eventType == EventTypeNames::connect) | 190 else if (eventType == EventTypeNames::connect) |
| 191 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionConnectEventListener); | 191 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionConnectEventListener); |
| 192 else if (eventType == EventTypeNames::close) | 192 else if (eventType == EventTypeNames::close) |
| 193 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionCloseEventListener); | 193 UseCounter::count(getExecutionContext(), UseCounter::PresentationConnect
ionCloseEventListener); |
| 194 else if (eventType == EventTypeNames::terminate) | 194 else if (eventType == EventTypeNames::terminate) |
| 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) |
| (...skipping 231 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 |