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

Unified Diff: remoting/protocol/jingle_messages.cc

Issue 1649513002: Add WebRTC support in ChromotingClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trans_con_life
Patch Set: Created 4 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
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_messages.cc
diff --git a/remoting/protocol/jingle_messages.cc b/remoting/protocol/jingle_messages.cc
index 959c6a5a6d151184f5a0b55ca258b56e5eca4cf2..45bc3b598c9391df0e8672d63d482c3ae84a0947 100644
--- a/remoting/protocol/jingle_messages.cc
+++ b/remoting/protocol/jingle_messages.cc
@@ -25,6 +25,8 @@ const char kJingleNamespace[] = "urn:xmpp:jingle:1";
// Namespace for transport messages when using standard ICE.
const char kIceTransportNamespace[] = "google:remoting:ice";
+const char kWebrtcTransportNamespace[] = "google:remoting:webrtc";
+
const char kEmptyNamespace[] = "";
const char kXmlNamespace[] = "http://www.w3.org/XML/1998/namespace";
@@ -332,11 +334,15 @@ scoped_ptr<buzz::XmlElement> JingleMessage::ToXml() const {
ContentDescription::kChromotingContentName);
content_tag->AddAttr(QName(kEmptyNamespace, "creator"), "initiator");
- if (description.get())
+ if (description)
content_tag->AddElement(description->ToXml());
- if (transport_info)
+ if (transport_info) {
content_tag->AddElement(new XmlElement(*transport_info));
+ } else if (description && description->config()->webrtc_supported()) {
+ content_tag->AddElement(
+ new XmlElement(QName(kWebrtcTransportNamespace, "transport")));
+ }
}
return root;
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698