OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/protocol/content_description.h" | 5 #include "remoting/protocol/content_description.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 } // namespace | 113 } // namespace |
114 | 114 |
115 ContentDescription::ContentDescription( | 115 ContentDescription::ContentDescription( |
116 scoped_ptr<CandidateSessionConfig> config, | 116 scoped_ptr<CandidateSessionConfig> config, |
117 scoped_ptr<buzz::XmlElement> authenticator_message) | 117 scoped_ptr<buzz::XmlElement> authenticator_message) |
118 : candidate_config_(config.Pass()), | 118 : candidate_config_(std::move(config)), |
119 authenticator_message_(authenticator_message.Pass()) { | 119 authenticator_message_(std::move(authenticator_message)) { |
120 } | 120 } |
121 | 121 |
122 ContentDescription::~ContentDescription() { } | 122 ContentDescription::~ContentDescription() { } |
123 | 123 |
124 // ToXml() creates content description for chromoting session. The | 124 // ToXml() creates content description for chromoting session. The |
125 // description looks as follows: | 125 // description looks as follows: |
126 // <description xmlns="google:remoting"> | 126 // <description xmlns="google:remoting"> |
127 // <standard-ice/> | 127 // <standard-ice/> |
128 // <control transport="stream" version="1" /> | 128 // <control transport="stream" version="1" /> |
129 // <event transport="datagram" version="1" /> | 129 // <event transport="datagram" version="1" /> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // Check if VP9 experiment is enabled. | 228 // Check if VP9 experiment is enabled. |
229 if (element->FirstNamed(QName(kChromotingXmlNamespace, kVp9ExperimentTag))) { | 229 if (element->FirstNamed(QName(kChromotingXmlNamespace, kVp9ExperimentTag))) { |
230 config->set_vp9_experiment_enabled(true); | 230 config->set_vp9_experiment_enabled(true); |
231 } | 231 } |
232 | 232 |
233 scoped_ptr<XmlElement> authenticator_message; | 233 scoped_ptr<XmlElement> authenticator_message; |
234 const XmlElement* child = Authenticator::FindAuthenticatorMessage(element); | 234 const XmlElement* child = Authenticator::FindAuthenticatorMessage(element); |
235 if (child) | 235 if (child) |
236 authenticator_message.reset(new XmlElement(*child)); | 236 authenticator_message.reset(new XmlElement(*child)); |
237 | 237 |
238 return make_scoped_ptr( | 238 return make_scoped_ptr(new ContentDescription( |
239 new ContentDescription(config.Pass(), authenticator_message.Pass())); | 239 std::move(config), std::move(authenticator_message))); |
240 } | 240 } |
241 | 241 |
242 } // namespace protocol | 242 } // namespace protocol |
243 } // namespace remoting | 243 } // namespace remoting |
OLD | NEW |