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 PresentationRequest_h | 5 #ifndef PresentationRequest_h |
6 #define PresentationRequest_h | 6 #define PresentationRequest_h |
7 | 7 |
8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
10 #include "bindings/core/v8/ScriptPromiseProperty.h" | |
10 #include "core/dom/ActiveDOMObject.h" | 11 #include "core/dom/ActiveDOMObject.h" |
11 #include "core/events/EventTarget.h" | 12 #include "core/events/EventTarget.h" |
13 #include "modules/ModulesExport.h" | |
12 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
13 #include "platform/heap/Heap.h" | 15 #include "platform/heap/Heap.h" |
14 #include "platform/weborigin/KURL.h" | 16 #include "platform/weborigin/KURL.h" |
15 | 17 |
16 namespace blink { | 18 namespace blink { |
17 | 19 |
20 class DOMException; | |
21 class PresentationAvailability; | |
22 class PresentationRequest; | |
23 | |
24 using PresentationAvailabilityProperty = | |
25 ScriptPromiseProperty<Member<PresentationRequest>, | |
26 Member<PresentationAvailability>, | |
27 Member<DOMException>>; | |
28 | |
18 // Implements the PresentationRequest interface from the Presentation API from | 29 // Implements the PresentationRequest interface from the Presentation API from |
19 // which websites can start or join presentation connections. | 30 // which websites can start or join presentation connections. |
20 class PresentationRequest final : public EventTargetWithInlineData, | 31 class MODULES_EXPORT PresentationRequest final |
mlamouri (slow - plz ping)
2016/12/13 13:56:12
Why did this become MODULES_EXPORT?
zhaobin
2016/12/14 02:25:09
Needed in unit tests.
| |
21 public ActiveScriptWrappable, | 32 : public EventTargetWithInlineData, |
22 public ActiveDOMObject { | 33 public ActiveScriptWrappable, |
34 public ActiveDOMObject { | |
23 USING_GARBAGE_COLLECTED_MIXIN(PresentationRequest); | 35 USING_GARBAGE_COLLECTED_MIXIN(PresentationRequest); |
24 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
25 | 37 |
26 public: | 38 public: |
27 ~PresentationRequest() = default; | 39 ~PresentationRequest() = default; |
28 | 40 |
29 static PresentationRequest* create(ExecutionContext*, | 41 static PresentationRequest* create(ExecutionContext*, |
30 const String& url, | 42 const String& url, |
31 ExceptionState&); | 43 ExceptionState&); |
32 | 44 |
(...skipping 15 matching lines...) Expand all Loading... | |
48 DECLARE_VIRTUAL_TRACE(); | 60 DECLARE_VIRTUAL_TRACE(); |
49 | 61 |
50 protected: | 62 protected: |
51 // EventTarget implementation. | 63 // EventTarget implementation. |
52 void addedEventListener(const AtomicString& eventType, | 64 void addedEventListener(const AtomicString& eventType, |
53 RegisteredEventListener&) override; | 65 RegisteredEventListener&) override; |
54 | 66 |
55 private: | 67 private: |
56 PresentationRequest(ExecutionContext*, const KURL&); | 68 PresentationRequest(ExecutionContext*, const KURL&); |
57 | 69 |
70 Member<PresentationAvailabilityProperty> m_availabilityProperty; | |
58 KURL m_url; | 71 KURL m_url; |
59 }; | 72 }; |
60 | 73 |
61 } // namespace blink | 74 } // namespace blink |
62 | 75 |
63 #endif // PresentationRequest_h | 76 #endif // PresentationRequest_h |
OLD | NEW |