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

Unified Diff: remoting/host/client_session.cc

Issue 2967793002: [Chromoting] Remove DataChannelManagerCallbacks constructor parameter of ClientSession (Closed)
Patch Set: Resolve review comments Created 3 years, 5 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/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index b98778211272d629494ec1f06572c363ae5af9e6..93d6440f17da4eebac0617102807c5aefee97e11 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -49,9 +49,7 @@ ClientSession::ClientSession(
const DesktopEnvironmentOptions& desktop_environment_options,
const base::TimeDelta& max_duration,
scoped_refptr<protocol::PairingRegistry> pairing_registry,
- const std::vector<HostExtension*>& extensions,
- const std::vector<protocol::DataChannelManager::NameCallbackPair>&
- data_channel_callbacks)
+ const std::vector<HostExtension*>& extensions)
: event_handler_(event_handler),
connection_(std::move(connection)),
client_jid_(connection_->session()->jid()),
@@ -76,11 +74,6 @@ ClientSession::ClientSession(
// Create a manager for the configured extensions, if any.
extension_manager_.reset(new HostExtensionSessionManager(extensions, this));
- for (const auto& callback : data_channel_callbacks) {
- data_channel_manager_.RegisterCreateHandlerCallback(callback.first,
- callback.second);
- }
-
#if defined(OS_WIN)
// LocalInputMonitorWin filters out an echo of the injected input before it
// reaches |remote_input_filter_|.
@@ -416,6 +409,13 @@ ClientSessionControl* ClientSession::session_control() {
return this;
}
+void ClientSession::RegisterCreateHandlerCallbackForTesting(
+ const std::string& prefix,
+ protocol::DataChannelManager::CreateHandlerCallback constructor) {
+ data_channel_manager_.RegisterCreateHandlerCallback(
+ prefix, std::move(constructor));
+}
+
void ClientSession::SetEventTimestampsSourceForTests(
scoped_refptr<protocol::InputEventTimestampsSource>
event_timestamp_source) {
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698