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

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

Issue 2602523002: [Presentation API] Resolve PresentationRequest::reconnect() with existing presentation connection i… (Closed)
Patch Set: resolve code review comments from haraken, Mark, and mlamouri 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
index 67f98aace0005002da40efd8c93f9f15bc0c5c73..48e4e20cdc83a1d330e5e1ac671738b73947fadd 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
@@ -384,6 +384,10 @@ void PresentationConnection::didReceiveBinaryMessage(const uint8_t* data,
ASSERT_NOT_REACHED();
}
+WebPresentationConnectionState PresentationConnection::getState() {
+ return m_state;
+}
+
void PresentationConnection::close() {
if (m_state != WebPresentationConnectionState::Connecting &&
m_state != WebPresentationConnectionState::Connected) {
@@ -412,6 +416,10 @@ bool PresentationConnection::matches(
m_id == static_cast<String>(client->getId());
}
+bool PresentationConnection::matches(const String& id, const KURL& url) const {
+ return m_url == url && m_id == id;
+}
+
void PresentationConnection::didChangeState(
WebPresentationConnectionState state) {
if (m_state == state)

Powered by Google App Engine
This is Rietveld 408576698