| 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/PresentationAvailability.h" | 5 #include "modules/presentation/PresentationAvailability.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/events/Event.h" | 9 #include "core/events/Event.h" |
| 10 #include "core/frame/UseCounter.h" | 10 #include "core/frame/UseCounter.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const AtomicString& PresentationAvailability::interfaceName() const | 56 const AtomicString& PresentationAvailability::interfaceName() const |
| 57 { | 57 { |
| 58 return EventTargetNames::PresentationAvailability; | 58 return EventTargetNames::PresentationAvailability; |
| 59 } | 59 } |
| 60 | 60 |
| 61 ExecutionContext* PresentationAvailability::executionContext() const | 61 ExecutionContext* PresentationAvailability::executionContext() const |
| 62 { | 62 { |
| 63 return ActiveDOMObject::executionContext(); | 63 return ActiveDOMObject::executionContext(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool PresentationAvailability::addEventListenerInternal(const AtomicString& even
tType, PassRefPtrWillBeRawPtr<EventListener> listener, const EventListenerOption
s& options) | 66 bool PresentationAvailability::addEventListenerInternal(const AtomicString& even
tType, RawPtr<EventListener> listener, const EventListenerOptions& options) |
| 67 { | 67 { |
| 68 if (eventType == EventTypeNames::change) | 68 if (eventType == EventTypeNames::change) |
| 69 UseCounter::count(executionContext(), UseCounter::PresentationAvailabili
tyChangeEventListener); | 69 UseCounter::count(executionContext(), UseCounter::PresentationAvailabili
tyChangeEventListener); |
| 70 | 70 |
| 71 return EventTarget::addEventListenerInternal(eventType, listener, options); | 71 return EventTarget::addEventListenerInternal(eventType, listener, options); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void PresentationAvailability::availabilityChanged(bool value) | 74 void PresentationAvailability::availabilityChanged(bool value) |
| 75 { | 75 { |
| 76 if (m_value == value) | 76 if (m_value == value) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 136 } |
| 137 | 137 |
| 138 DEFINE_TRACE(PresentationAvailability) | 138 DEFINE_TRACE(PresentationAvailability) |
| 139 { | 139 { |
| 140 RefCountedGarbageCollectedEventTargetWithInlineData<PresentationAvailability
>::trace(visitor); | 140 RefCountedGarbageCollectedEventTargetWithInlineData<PresentationAvailability
>::trace(visitor); |
| 141 PageLifecycleObserver::trace(visitor); | 141 PageLifecycleObserver::trace(visitor); |
| 142 ActiveDOMObject::trace(visitor); | 142 ActiveDOMObject::trace(visitor); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| OLD | NEW |