| 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 21 matching lines...) Expand all Loading... |
| 32 public: | 32 public: |
| 33 // For CallbackPromiseAdapter. | 33 // For CallbackPromiseAdapter. |
| 34 using WebType = bool; | 34 using WebType = bool; |
| 35 | 35 |
| 36 static PresentationAvailability* take(ScriptPromiseResolver*, const KURL&, b
ool); | 36 static PresentationAvailability* take(ScriptPromiseResolver*, const KURL&, b
ool); |
| 37 ~PresentationAvailability() override; | 37 ~PresentationAvailability() override; |
| 38 | 38 |
| 39 // EventTarget implementation. | 39 // EventTarget implementation. |
| 40 const AtomicString& interfaceName() const override; | 40 const AtomicString& interfaceName() const override; |
| 41 ExecutionContext* executionContext() const override; | 41 ExecutionContext* executionContext() const override; |
| 42 bool addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<
EventListener>, bool capture) override; |
| 42 | 43 |
| 43 // WebPresentationAvailabilityObserver implementation. | 44 // WebPresentationAvailabilityObserver implementation. |
| 44 void availabilityChanged(bool) override; | 45 void availabilityChanged(bool) override; |
| 45 const WebURL url() const override; | 46 const WebURL url() const override; |
| 46 | 47 |
| 47 // ActiveDOMObject implementation. | 48 // ActiveDOMObject implementation. |
| 48 bool hasPendingActivity() const override; | 49 bool hasPendingActivity() const override; |
| 49 void suspend() override; | 50 void suspend() override; |
| 50 void resume() override; | 51 void resume() override; |
| 51 void stop() override; | 52 void stop() override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 76 void updateListening(); | 77 void updateListening(); |
| 77 | 78 |
| 78 const KURL m_url; | 79 const KURL m_url; |
| 79 bool m_value; | 80 bool m_value; |
| 80 State m_state; | 81 State m_state; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace blink | 84 } // namespace blink |
| 84 | 85 |
| 85 #endif // PresentationAvailability_h | 86 #endif // PresentationAvailability_h |
| OLD | NEW |