Chromium Code Reviews| Index: third_party/WebKit/Source/modules/presentation/PresentationController.cpp |
| diff --git a/third_party/WebKit/Source/modules/presentation/PresentationController.cpp b/third_party/WebKit/Source/modules/presentation/PresentationController.cpp |
| index 65d4edecad0fbfcede0a233126b2afe3d2d6efb7..d7687dbe4e2a64d5ca13493894240bcca894f2c9 100644 |
| --- a/third_party/WebKit/Source/modules/presentation/PresentationController.cpp |
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationController.cpp |
| @@ -148,6 +148,20 @@ void PresentationController::contextDestroyed() { |
| } |
| } |
| +PresentationConnection* PresentationController::findExistingConnection( |
| + const blink::WebVector<blink::WebURL>& presentationUrls, |
| + const blink::WebString& presentationId) { |
| + for (const auto& connection : m_connections) { |
| + for (const auto& presentationUrl : presentationUrls) { |
| + if (connection->getState() != |
| + WebPresentationConnectionState::Terminated && |
| + connection->matches(presentationId, presentationUrl)) |
| + return connection.get(); |
|
mlamouri (slow - plz ping)
2017/01/03 12:02:11
style: you need { } because the condition is more
zhaobin
2017/01/03 20:12:07
Done.
|
| + } |
| + } |
| + return nullptr; |
| +} |
| + |
| PresentationConnection* PresentationController::findConnection( |
| WebPresentationConnectionClient* connectionClient) { |
| for (const auto& connection : m_connections) { |