| 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
|
|
|