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..39d363274164ef010548dd1a5a80e52fb6260022 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h |
| @@ -0,0 +1,42 @@ |
| +// 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/events/EventTarget.h" |
| +#include "core/frame/DOMWindowProperty.h" |
|
haraken
2016/08/23 02:19:33
It's unused.
zhaobin
2016/08/23 20:43:53
Done.
|
| +#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 |
|
mark a. foltz
2016/08/23 19:08:49
mlamouri@: PresentationConnection, PresentationRec
|
| + : public EventTargetWithInlineData { |
|
mlamouri (slow - plz ping)
2016/08/23 13:04:50
style: keep in the same line?
zhaobin
2016/08/23 20:43:54
Added a new base class, keep them in seperate line
|
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + explicit PresentationConnectionList(LocalFrame*); |
| + ~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; |
| + Member<LocalFrame> m_frame; |
|
haraken
2016/08/23 02:19:33
There's not reason you need to keep a pointer to L
zhaobin
2016/08/23 20:43:54
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // PresentationConnectionList_h |