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/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
10 #include "core/page/PageLifecycleObserver.h" | 10 #include "core/page/PageLifecycleObserver.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 // For CallbackPromiseAdapter. | 31 // For CallbackPromiseAdapter. |
32 using WebType = bool; | 32 using WebType = bool; |
33 | 33 |
34 static PresentationAvailability* take(ScriptPromiseResolver*, bool); | 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 bool addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<
EventListener>, bool capture) override; |
40 | 41 |
41 // WebPresentationAvailabilityObserver implementation. | 42 // WebPresentationAvailabilityObserver implementation. |
42 void availabilityChanged(bool) override; | 43 void availabilityChanged(bool) override; |
43 | 44 |
44 // ActiveDOMObject implementation. | 45 // ActiveDOMObject implementation. |
45 bool hasPendingActivity() const override; | 46 bool hasPendingActivity() const override; |
46 void suspend() override; | 47 void suspend() override; |
47 void resume() override; | 48 void resume() override; |
48 void stop() override; | 49 void stop() override; |
49 | 50 |
(...skipping 22 matching lines...) Expand all Loading... |
72 void setState(State); | 73 void setState(State); |
73 void updateListening(); | 74 void updateListening(); |
74 | 75 |
75 bool m_value; | 76 bool m_value; |
76 State m_state; | 77 State m_state; |
77 }; | 78 }; |
78 | 79 |
79 } // namespace blink | 80 } // namespace blink |
80 | 81 |
81 #endif // PresentationAvailability_h | 82 #endif // PresentationAvailability_h |
OLD | NEW |