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

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

Issue 2622533002: Prefer ContextClient mixin over manual ExecutionContext handling. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h ('k') | no next file » | 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 #include "modules/presentation/PresentationConnectionList.h" 5 #include "modules/presentation/PresentationConnectionList.h"
6 6
7 #include "core/frame/UseCounter.h" 7 #include "core/frame/UseCounter.h"
8 #include "modules/EventTargetModules.h" 8 #include "modules/EventTargetModules.h"
9 #include "modules/presentation/PresentationConnection.h" 9 #include "modules/presentation/PresentationConnection.h"
10 #include "modules/presentation/PresentationConnectionAvailableEvent.h" 10 #include "modules/presentation/PresentationConnectionAvailableEvent.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 PresentationConnectionList::PresentationConnectionList( 14 PresentationConnectionList::PresentationConnectionList(
15 ExecutionContext* context) 15 ExecutionContext* context)
16 : m_executionContext(context) {} 16 : ContextClient(context) {}
17 17
18 const AtomicString& PresentationConnectionList::interfaceName() const { 18 const AtomicString& PresentationConnectionList::interfaceName() const {
19 return EventTargetNames::PresentationConnectionList; 19 return EventTargetNames::PresentationConnectionList;
20 } 20 }
21 21
22 const HeapVector<Member<PresentationConnection>>& 22 const HeapVector<Member<PresentationConnection>>&
23 PresentationConnectionList::connections() const { 23 PresentationConnectionList::connections() const {
24 return m_connections; 24 return m_connections;
25 } 25 }
26 26
(...skipping 17 matching lines...) Expand all
44 dispatchEvent(PresentationConnectionAvailableEvent::create( 44 dispatchEvent(PresentationConnectionAvailableEvent::create(
45 EventTypeNames::connectionavailable, connection)); 45 EventTypeNames::connectionavailable, connection));
46 } 46 }
47 47
48 bool PresentationConnectionList::isEmpty() { 48 bool PresentationConnectionList::isEmpty() {
49 return m_connections.isEmpty(); 49 return m_connections.isEmpty();
50 } 50 }
51 51
52 DEFINE_TRACE(PresentationConnectionList) { 52 DEFINE_TRACE(PresentationConnectionList) {
53 visitor->trace(m_connections); 53 visitor->trace(m_connections);
54 visitor->trace(m_executionContext);
55 EventTargetWithInlineData::trace(visitor); 54 EventTargetWithInlineData::trace(visitor);
55 ContextClient::trace(visitor);
56 } 56 }
57 57
58 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationConnectionList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698