| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const AtomicString& PresentationAvailability::interfaceName() const | 57 const AtomicString& PresentationAvailability::interfaceName() const |
| 58 { | 58 { |
| 59 return EventTargetNames::PresentationAvailability; | 59 return EventTargetNames::PresentationAvailability; |
| 60 } | 60 } |
| 61 | 61 |
| 62 ExecutionContext* PresentationAvailability::getExecutionContext() const | 62 ExecutionContext* PresentationAvailability::getExecutionContext() const |
| 63 { | 63 { |
| 64 return ActiveDOMObject::getExecutionContext(); | 64 return ActiveDOMObject::getExecutionContext(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool PresentationAvailability::addEventListenerInternal(const AtomicString& even
tType, PassRefPtrWillBeRawPtr<EventListener> listener, const EventListenerOption
s& options) | 67 bool PresentationAvailability::addEventListenerInternal(const AtomicString& even
tType, RawPtr<EventListener> listener, const EventListenerOptions& options) |
| 68 { | 68 { |
| 69 if (eventType == EventTypeNames::change) | 69 if (eventType == EventTypeNames::change) |
| 70 UseCounter::count(getExecutionContext(), UseCounter::PresentationAvailab
ilityChangeEventListener); | 70 UseCounter::count(getExecutionContext(), UseCounter::PresentationAvailab
ilityChangeEventListener); |
| 71 | 71 |
| 72 return EventTarget::addEventListenerInternal(eventType, listener, options); | 72 return EventTarget::addEventListenerInternal(eventType, listener, options); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void PresentationAvailability::availabilityChanged(bool value) | 75 void PresentationAvailability::availabilityChanged(bool value) |
| 76 { | 76 { |
| 77 if (m_value == value) | 77 if (m_value == value) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 | 138 |
| 139 DEFINE_TRACE(PresentationAvailability) | 139 DEFINE_TRACE(PresentationAvailability) |
| 140 { | 140 { |
| 141 RefCountedGarbageCollectedEventTargetWithInlineData<PresentationAvailability
>::trace(visitor); | 141 RefCountedGarbageCollectedEventTargetWithInlineData<PresentationAvailability
>::trace(visitor); |
| 142 PageLifecycleObserver::trace(visitor); | 142 PageLifecycleObserver::trace(visitor); |
| 143 ActiveDOMObject::trace(visitor); | 143 ActiveDOMObject::trace(visitor); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace blink | 146 } // namespace blink |
| OLD | NEW |