Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.h

Issue 2572473003: [Presentation API] PresentationRequest::getAvailability() should return the same promise (Closed)
Patch Set: rebase with master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "core/dom/SuspendableObject.h" 10 #include "core/dom/SuspendableObject.h"
11 #include "core/events/EventTarget.h" 11 #include "core/events/EventTarget.h"
12 #include "modules/ModulesExport.h"
13 #include "modules/presentation/PresentationPromiseProperty.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
18 // Implements the PresentationRequest interface from the Presentation API from 20 // Implements the PresentationRequest interface from the Presentation API from
19 // which websites can start or join presentation connections. 21 // which websites can start or join presentation connections.
20 class PresentationRequest final 22 class MODULES_EXPORT PresentationRequest final
21 : public EventTargetWithInlineData, 23 : public EventTargetWithInlineData,
22 public ActiveScriptWrappable<PresentationRequest>, 24 public ActiveScriptWrappable<PresentationRequest>,
23 public SuspendableObject { 25 public SuspendableObject {
24 USING_GARBAGE_COLLECTED_MIXIN(PresentationRequest); 26 USING_GARBAGE_COLLECTED_MIXIN(PresentationRequest);
25 DEFINE_WRAPPERTYPEINFO(); 27 DEFINE_WRAPPERTYPEINFO();
26 28
27 public: 29 public:
28 ~PresentationRequest() = default; 30 ~PresentationRequest() = default;
29 31
30 static PresentationRequest* create(ExecutionContext*, 32 static PresentationRequest* create(ExecutionContext*,
(...skipping 18 matching lines...) Expand all
49 DECLARE_VIRTUAL_TRACE(); 51 DECLARE_VIRTUAL_TRACE();
50 52
51 protected: 53 protected:
52 // EventTarget implementation. 54 // EventTarget implementation.
53 void addedEventListener(const AtomicString& eventType, 55 void addedEventListener(const AtomicString& eventType,
54 RegisteredEventListener&) override; 56 RegisteredEventListener&) override;
55 57
56 private: 58 private:
57 PresentationRequest(ExecutionContext*, const KURL&); 59 PresentationRequest(ExecutionContext*, const KURL&);
58 60
61 Member<PresentationAvailabilityProperty> m_availabilityProperty;
59 KURL m_url; 62 KURL m_url;
60 }; 63 };
61 64
62 } // namespace blink 65 } // namespace blink
63 66
64 #endif // PresentationRequest_h 67 #endif // PresentationRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698