| 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 "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 9 #include "core/dom/SuspendableObject.h" | 9 #include "core/dom/SuspendableObject.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| 11 #include "core/page/PageVisibilityObserver.h" | 11 #include "core/page/PageVisibilityObserver.h" |
| 12 #include "modules/ModulesExport.h" | 12 #include "modules/ModulesExport.h" |
| 13 #include "modules/presentation/PresentationPromiseProperty.h" | 13 #include "modules/presentation/PresentationPromiseProperty.h" |
| 14 #include "platform/weborigin/KURL.h" | 14 #include "platform/weborigin/KURL.h" |
| 15 #include "platform/wtf/Vector.h" |
| 15 #include "public/platform/WebURL.h" | 16 #include "public/platform/WebURL.h" |
| 16 #include "public/platform/WebVector.h" | 17 #include "public/platform/WebVector.h" |
| 17 #include "public/platform/modules/presentation/WebPresentationAvailabilityObserv
er.h" | 18 #include "public/platform/modules/presentation/WebPresentationAvailabilityObserv
er.h" |
| 18 #include "wtf/Vector.h" | |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 class ExecutionContext; | 22 class ExecutionContext; |
| 23 | 23 |
| 24 // Expose whether there is a presentation display available for |url|. The | 24 // Expose whether there is a presentation display available for |url|. The |
| 25 // object will be initialized with a default value passed via ::take() and will | 25 // object will be initialized with a default value passed via ::take() and will |
| 26 // then subscribe to receive callbacks if the status for |url| were to | 26 // then subscribe to receive callbacks if the status for |url| were to |
| 27 // change. The object will only listen to changes when required. | 27 // change. The object will only listen to changes when required. |
| 28 class MODULES_EXPORT PresentationAvailability final | 28 class MODULES_EXPORT PresentationAvailability final |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void UpdateListening(); | 87 void UpdateListening(); |
| 88 | 88 |
| 89 WebVector<WebURL> urls_; | 89 WebVector<WebURL> urls_; |
| 90 bool value_; | 90 bool value_; |
| 91 State state_; | 91 State state_; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| 95 | 95 |
| 96 #endif // PresentationAvailability_h | 96 #endif // PresentationAvailability_h |
| OLD | NEW |