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

Side by Side 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 unified diff | Download patch
OLDNEW
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/fake_session.h" 5 #include "remoting/protocol/fake_session.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "remoting/protocol/fake_authenticator.h" 10 #include "remoting/protocol/fake_authenticator.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 base::Passed(&transport_info)), 97 base::Passed(&transport_info)),
98 signaling_delay_); 98 signaling_delay_);
99 } 99 }
100 } 100 }
101 101
102 void FakeSession::ProcessTransportInfo( 102 void FakeSession::ProcessTransportInfo(
103 std::unique_ptr<buzz::XmlElement> transport_info) { 103 std::unique_ptr<buzz::XmlElement> transport_info) {
104 transport_->ProcessTransportInfo(transport_info.get()); 104 transport_->ProcessTransportInfo(transport_info.get());
105 } 105 }
106 106
107 // TODO(zijiehe): Supports SessionPlugin in FakeSession.
108 void FakeSession::AddPlugin(SessionPlugin* plugin) { 107 void FakeSession::AddPlugin(SessionPlugin* plugin) {
109 NOTIMPLEMENTED(); 108 DCHECK(plugin);
109 for (const auto& message : attachments_) {
110 if (message.attachments) {
111 plugin->OnIncomingMessage(*(message.attachments));
112 }
113 }
114 }
115
116 void FakeSession::SetAttachment(size_t round,
117 std::unique_ptr<buzz::XmlElement> attachment) {
118 while (attachments_.size() <= round) {
119 attachments_.emplace_back();
120 }
121 attachments_[round].AddAttachment(std::move(attachment));
110 } 122 }
111 123
112 } // namespace protocol 124 } // namespace protocol
113 } // namespace remoting 125 } // namespace remoting
OLDNEW
« 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