Chromium Code Reviews| 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..b7bfdab541d27f11748a334bc762ca4a4a92b4b7 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// 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 "core/dom/ContextLifecycleObserver.h" |
| +#include "core/events/EventTarget.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 ContextLifecycleObserver { |
|
mlamouri (slow - plz ping)
2016/08/24 16:48:59
I think DOMWindowProperty would make sense.
zhaobin
2016/08/24 17:34:12
haraken suggests that it is not necessary to inher
|
| + USING_GARBAGE_COLLECTED_MIXIN(PresentationConnectionList); |
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + explicit PresentationConnectionList(LocalFrame*); |
|
haraken
2016/08/24 01:09:33
Would you pass in ExecutionContext* instead of Loc
zhaobin
2016/08/24 17:34:12
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 |