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

Unified Diff: remoting/protocol/fake_session.cc

Issue 2615113005: [Chromoting] Use HostExperimentSessionPlugin in host (Closed)
Patch Set: Enable two-way control of DirectX capturer 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
« remoting/host/host_session_options.cc ('K') | « remoting/protocol/fake_session.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.cc
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index 56cbd51b1e5390eaa074aae26744b188fe1d3b43..6f0c8b8072516916e6d659605faa17645df0c8d9 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -104,9 +104,21 @@ void FakeSession::ProcessTransportInfo(
transport_->ProcessTransportInfo(transport_info.get());
}
-// TODO(zijiehe): Supports SessionPlugin in FakeSession.
void FakeSession::AddPlugin(SessionPlugin* plugin) {
- NOTIMPLEMENTED();
+ DCHECK(plugin);
+ for (const auto& message : attachments_) {
+ if (message.attachments) {
+ plugin->OnIncomingMessage(*(message.attachments));
+ }
+ }
+}
+
+void FakeSession::SetAttachment(size_t round,
+ std::unique_ptr<buzz::XmlElement> attachment) {
+ while (attachments_.size() <= round) {
+ attachments_.emplace_back();
+ }
+ attachments_[round].AddAttachment(std::move(attachment));
}
} // namespace protocol
« remoting/host/host_session_options.cc ('K') | « remoting/protocol/fake_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698