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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnectionList.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: 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/PresentationConnectionList.h
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h
new file mode 100644
index 0000000000000000000000000000000000000000..56a9fa81cae95268708a95c3334043cf067e7089
--- /dev/null
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
haraken 2016/08/23 00:03:48 2016
zhaobin 2016/08/23 00:45:51 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PresentationConnectionList_h
+#define PresentationConnectionList_h
+
+#include "bindings/core/v8/ScriptPromise.h"
haraken 2016/08/23 00:03:48 It's unused.
zhaobin 2016/08/23 00:45:51 Done.
+#include "core/events/EventTarget.h"
+#include "core/frame/DOMWindowProperty.h"
+#include "modules/presentation/PresentationConnection.h"
+#include "platform/heap/Handle.h"
+#include "platform/heap/Heap.h"
+
+namespace blink {
+
+// Implements the PresentationConnectionList interface from the Presentation API from
+// which represents set of presentation connections in the set of
+// presentation controllers.
+class PresentationConnectionList final
+ : public EventTargetWithInlineData
+ , public DOMWindowProperty {
haraken 2016/08/23 00:03:48 Why do you need to inherit from DOMWindowProperty?
zhaobin 2016/08/23 00:45:51 Done.
+ USING_GARBAGE_COLLECTED_MIXIN(PresentationConnectionList);
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ PresentationConnectionList(LocalFrame*);
haraken 2016/08/23 00:03:48 Add explicit.
zhaobin 2016/08/23 00:45:51 Done.
+ ~PresentationConnectionList() = default;
+
+ // EventTarget implementation.
+ const AtomicString& interfaceName() const override;
+ ExecutionContext* getExecutionContext() const override;
+
+ const HeapVector<Member<PresentationConnection>>& connections() const;
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable);
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ HeapVector<Member<PresentationConnection>> m_connections;
+};
+
+} // namespace blink
+
+#endif // PresentationConnectionList_h

Powered by Google App Engine
This is Rietveld 408576698