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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... 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
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"
(...skipping 27 matching lines...) Expand all
38 38
39 return m_connectionListProperty->promise(scriptState->world()); 39 return m_connectionListProperty->promise(scriptState->world());
40 } 40 }
41 41
42 void PresentationReceiver::onReceiverConnectionAvailable( 42 void PresentationReceiver::onReceiverConnectionAvailable(
43 WebPresentationConnectionClient* connectionClient) { 43 WebPresentationConnectionClient* connectionClient) {
44 DCHECK(connectionClient); 44 DCHECK(connectionClient);
45 // take() will call PresentationReceiver::registerConnection() 45 // take() will call PresentationReceiver::registerConnection()
46 // and register the connection. 46 // and register the connection.
47 auto connection = 47 auto connection =
48 PresentationConnection::take(this, wrapUnique(connectionClient)); 48 PresentationConnection::take(this, WTF::wrapUnique(connectionClient));
49 49
50 // receiver.connectionList property not accessed 50 // receiver.connectionList property not accessed
51 if (!m_connectionListProperty) 51 if (!m_connectionListProperty)
52 return; 52 return;
53 53
54 if (m_connectionListProperty->getState() == 54 if (m_connectionListProperty->getState() ==
55 ScriptPromisePropertyBase::Pending) 55 ScriptPromisePropertyBase::Pending)
56 m_connectionListProperty->resolve(m_connectionList); 56 m_connectionListProperty->resolve(m_connectionList);
57 else if (m_connectionListProperty->getState() == 57 else if (m_connectionListProperty->getState() ==
58 ScriptPromisePropertyBase::Resolved) 58 ScriptPromisePropertyBase::Resolved)
59 m_connectionList->dispatchConnectionAvailableEvent(connection); 59 m_connectionList->dispatchConnectionAvailableEvent(connection);
60 } 60 }
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 DOMWindowProperty::trace(visitor);
72 } 72 }
73 } // namespace blink 73 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698