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

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: remove getExecutionContext() null check in PresentationRequest::reconnect() Created 3 years, 11 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/PresentationConnection.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
index cbcb2d10556eeced4d41afcfaa0fc7544afb51e8..be94c78b5cbe27f3800a4a7eeafc31a025dc6703 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
@@ -381,6 +381,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) {
@@ -408,6 +412,10 @@ bool PresentationConnection::matches(
return m_url == KURL(sessionInfo.url) && m_id == String(sessionInfo.id);
}
+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