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

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

Issue 2558643004: Remove ContextLifecycleObserver from PresentationConnectionList (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 PresentationConnectionList_h 5 #ifndef PresentationConnectionList_h
6 #define PresentationConnectionList_h 6 #define PresentationConnectionList_h
7 7
8 #include "core/dom/ContextLifecycleObserver.h" 8 #include "core/dom/ContextLifecycleObserver.h"
sof 2016/12/07 07:42:12 Unused
9 #include "core/events/EventTarget.h" 9 #include "core/events/EventTarget.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "modules/presentation/PresentationConnection.h" 11 #include "modules/presentation/PresentationConnection.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 #include "platform/heap/Heap.h" 13 #include "platform/heap/Heap.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 // Implements the PresentationConnectionList interface from the Presentation API 17 // Implements the PresentationConnectionList interface from the Presentation API
18 // from which represents set of presentation connections in the set of 18 // from which represents set of presentation connections in the set of
19 // presentation controllers. 19 // presentation controllers.
20 class MODULES_EXPORT PresentationConnectionList final 20 class MODULES_EXPORT PresentationConnectionList final
21 : public EventTargetWithInlineData, 21 : public EventTargetWithInlineData {
22 public ContextLifecycleObserver {
23 USING_GARBAGE_COLLECTED_MIXIN(PresentationConnectionList);
24 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
25 23
26 public: 24 public:
27 explicit PresentationConnectionList(ExecutionContext*); 25 explicit PresentationConnectionList(ExecutionContext*);
28 ~PresentationConnectionList() = default; 26 ~PresentationConnectionList() = default;
29 27
30 // EventTarget implementation. 28 // EventTarget implementation.
31 const AtomicString& interfaceName() const override; 29 const AtomicString& interfaceName() const override;
32 ExecutionContext* getExecutionContext() const override; 30 ExecutionContext* getExecutionContext() const override {
31 return m_executionContext;
32 }
33 33
34 // PresentationConnectionList.idl implementation. 34 // PresentationConnectionList.idl implementation.
35 const HeapVector<Member<PresentationConnection>>& connections() const; 35 const HeapVector<Member<PresentationConnection>>& connections() const;
36 DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable); 36 DEFINE_ATTRIBUTE_EVENT_LISTENER(connectionavailable);
37 37
38 void addConnection(PresentationConnection*); 38 void addConnection(PresentationConnection*);
39 void dispatchConnectionAvailableEvent(PresentationConnection*); 39 void dispatchConnectionAvailableEvent(PresentationConnection*);
40 bool isEmpty(); 40 bool isEmpty();
41 41
42 DECLARE_VIRTUAL_TRACE(); 42 DECLARE_VIRTUAL_TRACE();
43 43
44 protected: 44 protected:
45 // EventTarget implementation. 45 // EventTarget implementation.
46 void addedEventListener(const AtomicString& eventType, 46 void addedEventListener(const AtomicString& eventType,
47 RegisteredEventListener&) override; 47 RegisteredEventListener&) override;
48 48
49 private: 49 private:
50 friend class PresentationReceiverTest; 50 friend class PresentationReceiverTest;
51 51
52 HeapVector<Member<PresentationConnection>> m_connections; 52 HeapVector<Member<PresentationConnection>> m_connections;
53 Member<ExecutionContext> m_executionContext;
haraken 2016/12/07 07:37:10 Before this CL, it was a weak member. But I don't
53 }; 54 };
54 55
55 } // namespace blink 56 } // namespace blink
56 57
57 #endif // PresentationConnectionList_h 58 #endif // PresentationConnectionList_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698