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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationReceiver.h

Issue 2265363002: [Presentation API] make PresentationReceiver API consistent with latest spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix layout test global-interface-listing.html Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationReceiver.h
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.h b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.h
index 88b93d4315f26569d3d4a2e70289f7c918efd94f..c3571e8e70f32ee6281be1059245b2be204a546b 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.h
@@ -6,34 +6,37 @@
#define PresentationReceiver_h
#include "bindings/core/v8/ScriptPromise.h"
-#include "core/events/EventTarget.h"
+#include "bindings/core/v8/ScriptPromiseProperty.h"
+#include "bindings/core/v8/ScriptWrappable.h"
#include "core/frame/DOMWindowProperty.h"
#include "platform/heap/Handle.h"
#include "platform/heap/Heap.h"
namespace blink {
+class PresentationConnectionList;
+class PresentationReceiver;
+
+using ConnectionListProperty = ScriptPromiseProperty<Member<PresentationReceiver>, Member<PresentationConnectionList>, Member<DOMException>>;
+
// Implements the PresentationReceiver interface from the Presentation API from
// which websites can implement the receiving side of a presentation session.
class PresentationReceiver final
- : public EventTargetWithInlineData
- , DOMWindowProperty {
+ : public GarbageCollected<PresentationReceiver>
+ , public ScriptWrappable
+ , public DOMWindowProperty {
USING_GARBAGE_COLLECTED_MIXIN(PresentationReceiver);
DEFINE_WRAPPERTYPEINFO();
public:
- PresentationReceiver(LocalFrame*);
+ explicit PresentationReceiver(LocalFrame*);
~PresentationReceiver() = default;
- // EventTarget implementation.
- const AtomicString& interfaceName() const override;
- ExecutionContext* getExecutionContext() const override;
-
- ScriptPromise getConnection(ScriptState*);
- ScriptPromise getConnections(ScriptState*);
-
- DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable);
+ ScriptPromise connectionList(ScriptState*);
DECLARE_VIRTUAL_TRACE();
+
+private:
+ Member<ConnectionListProperty> m_connectionListProperty;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698