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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp

Issue 2355723004: [Presentation API] 1-UA: send message between controller and receiver page (Closed)
Patch Set: Merge with changes in Issue 2343013002 Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp
index 1253eae3432abffa09a6b4b266eba0997d1cf6bc..909ad0ca4fce790d1a6596a9fd173e915312ccee 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionList.cpp
@@ -54,6 +54,16 @@ bool PresentationConnectionList::isEmpty()
return m_connections.isEmpty();
}
+PresentationConnection* PresentationConnectionList::findConnection(WebPresentationConnectionClient* connectionClient)
+{
+ for (const auto& connection : m_connections) {
+ if (connection->matches(connectionClient))
+ return connection.get();
+ }
+
+ return nullptr;
+}
+
DEFINE_TRACE(PresentationConnectionList)
{
visitor->trace(m_connections);

Powered by Google App Engine
This is Rietveld 408576698