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

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

Issue 2592073002: Replace DOMWindowProperty in modules/presentation/ with ContextClient (Closed)
Patch Set: Created 3 years, 12 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/PresentationReceiver.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/PresentationReceiver.h" 5 #include "modules/presentation/PresentationReceiver.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "core/dom/DOMException.h" 9 #include "core/dom/DOMException.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
11 #include "core/dom/ExceptionCode.h" 11 #include "core/dom/ExceptionCode.h"
12 #include "core/frame/LocalFrame.h" 12 #include "core/frame/LocalFrame.h"
13 #include "modules/presentation/PresentationConnection.h" 13 #include "modules/presentation/PresentationConnection.h"
14 #include "modules/presentation/PresentationConnectionList.h" 14 #include "modules/presentation/PresentationConnectionList.h"
15 #include "public/platform/modules/presentation/WebPresentationClient.h" 15 #include "public/platform/modules/presentation/WebPresentationClient.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 PresentationReceiver::PresentationReceiver(LocalFrame* frame, 19 PresentationReceiver::PresentationReceiver(LocalFrame* frame,
20 WebPresentationClient* client) 20 WebPresentationClient* client)
21 : DOMWindowProperty(frame) { 21 : ContextClient(frame) {
22 m_connectionList = new PresentationConnectionList(frame->document()); 22 m_connectionList = new PresentationConnectionList(frame->document());
23 23
24 if (client) 24 if (client)
25 client->setReceiver(this); 25 client->setReceiver(this);
26 } 26 }
27 27
28 ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState) { 28 ScriptPromise PresentationReceiver::connectionList(ScriptState* scriptState) {
29 if (!m_connectionListProperty) 29 if (!m_connectionListProperty)
30 m_connectionListProperty = 30 m_connectionListProperty =
31 new ConnectionListProperty(scriptState->getExecutionContext(), this, 31 new ConnectionListProperty(scriptState->getExecutionContext(), this,
(...skipping 29 matching lines...) Expand all
61 61
62 void PresentationReceiver::registerConnection( 62 void PresentationReceiver::registerConnection(
63 PresentationConnection* connection) { 63 PresentationConnection* connection) {
64 DCHECK(m_connectionList); 64 DCHECK(m_connectionList);
65 m_connectionList->addConnection(connection); 65 m_connectionList->addConnection(connection);
66 } 66 }
67 67
68 DEFINE_TRACE(PresentationReceiver) { 68 DEFINE_TRACE(PresentationReceiver) {
69 visitor->trace(m_connectionList); 69 visitor->trace(m_connectionList);
70 visitor->trace(m_connectionListProperty); 70 visitor->trace(m_connectionListProperty);
71 DOMWindowProperty::trace(visitor); 71 ContextClient::trace(visitor);
72 } 72 }
73
73 } // namespace blink 74 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationReceiver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698