| OLD | NEW |
| 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 #ifndef PresentationAvailability_h | 5 #ifndef PresentationAvailability_h |
| 6 #define PresentationAvailability_h | 6 #define PresentationAvailability_h |
| 7 | 7 |
| 8 #include "core/dom/ActiveDOMObject.h" | 8 #include "core/dom/ActiveDOMObject.h" |
| 9 #include "core/dom/DocumentVisibilityObserver.h" | 9 #include "core/dom/DocumentVisibilityObserver.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class PresentationAvailability final | 22 class PresentationAvailability final |
| 23 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationAva
ilability> | 23 : public RefCountedGarbageCollectedEventTargetWithInlineData<PresentationAva
ilability> |
| 24 , public ActiveDOMObject | 24 , public ActiveDOMObject |
| 25 , public DocumentVisibilityObserver | 25 , public DocumentVisibilityObserver |
| 26 , public WebPresentationAvailabilityObserver { | 26 , public WebPresentationAvailabilityObserver { |
| 27 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PresentationAvailability); | 27 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(PresentationAvailability); |
| 28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationAvailability); | 28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationAvailability); |
| 29 DEFINE_WRAPPERTYPEINFO(); | 29 DEFINE_WRAPPERTYPEINFO(); |
| 30 public: | 30 public: |
| 31 // For CallbackPromiseAdapter. | 31 // For CallbackPromiseAdapter. |
| 32 using WebType = OwnPtr<bool>; | 32 using WebType = bool; |
| 33 | 33 |
| 34 static PresentationAvailability* take(ScriptPromiseResolver*, PassOwnPtr<boo
l>); | 34 static PresentationAvailability* take(ScriptPromiseResolver*, bool); |
| 35 ~PresentationAvailability() override; | 35 ~PresentationAvailability() override; |
| 36 | 36 |
| 37 // EventTarget implementation. | 37 // EventTarget implementation. |
| 38 const AtomicString& interfaceName() const override; | 38 const AtomicString& interfaceName() const override; |
| 39 ExecutionContext* executionContext() const override; | 39 ExecutionContext* executionContext() const override; |
| 40 | 40 |
| 41 // WebPresentationAvailabilityObserver implementation. | 41 // WebPresentationAvailabilityObserver implementation. |
| 42 void availabilityChanged(bool) override; | 42 void availabilityChanged(bool) override; |
| 43 | 43 |
| 44 // ActiveDOMObject implementation. | 44 // ActiveDOMObject implementation. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 72 void setState(State); | 72 void setState(State); |
| 73 void updateListening(); | 73 void updateListening(); |
| 74 | 74 |
| 75 bool m_value; | 75 bool m_value; |
| 76 State m_state; | 76 State m_state; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // PresentationAvailability_h | 81 #endif // PresentationAvailability_h |
| OLD | NEW |