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

Side by Side Diff: remoting/host/client_session.h

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 unified diff | Download patch
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_
6 #define REMOTING_HOST_CLIENT_SESSION_H_ 6 #define REMOTING_HOST_CLIENT_SESSION_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // |event_handler| and |desktop_environment_factory| must outlive |this|. 91 // |event_handler| and |desktop_environment_factory| must outlive |this|.
92 // All |HostExtension|s in |extensions| must outlive |this|. 92 // All |HostExtension|s in |extensions| must outlive |this|.
93 ClientSession( 93 ClientSession(
94 EventHandler* event_handler, 94 EventHandler* event_handler,
95 std::unique_ptr<protocol::ConnectionToClient> connection, 95 std::unique_ptr<protocol::ConnectionToClient> connection,
96 DesktopEnvironmentFactory* desktop_environment_factory, 96 DesktopEnvironmentFactory* desktop_environment_factory,
97 const DesktopEnvironmentOptions& desktop_environment_options, 97 const DesktopEnvironmentOptions& desktop_environment_options,
98 const base::TimeDelta& max_duration, 98 const base::TimeDelta& max_duration,
99 scoped_refptr<protocol::PairingRegistry> pairing_registry, 99 scoped_refptr<protocol::PairingRegistry> pairing_registry,
100 const std::vector<HostExtension*>& extensions, 100 const std::vector<HostExtension*>& extensions);
101 const std::vector<protocol::DataChannelManager::NameCallbackPair>&
102 data_channel_callbacks);
103 ~ClientSession() override; 101 ~ClientSession() override;
104 102
105 // Returns the set of capabilities negotiated between client and host. 103 // Returns the set of capabilities negotiated between client and host.
106 const std::string& capabilities() const { return capabilities_; } 104 const std::string& capabilities() const { return capabilities_; }
107 105
108 // protocol::HostStub interface. 106 // protocol::HostStub interface.
109 void NotifyClientResolution( 107 void NotifyClientResolution(
110 const protocol::ClientResolution& resolution) override; 108 const protocol::ClientResolution& resolution) override;
111 void ControlVideo(const protocol::VideoControl& video_control) override; 109 void ControlVideo(const protocol::VideoControl& video_control) override;
112 void ControlAudio(const protocol::AudioControl& audio_control) override; 110 void ControlAudio(const protocol::AudioControl& audio_control) override;
(...skipping 25 matching lines...) Expand all
138 ClientSessionControl* session_control() override; 136 ClientSessionControl* session_control() override;
139 137
140 protocol::ConnectionToClient* connection() const { return connection_.get(); } 138 protocol::ConnectionToClient* connection() const { return connection_.get(); }
141 139
142 bool is_authenticated() { return is_authenticated_; } 140 bool is_authenticated() { return is_authenticated_; }
143 141
144 const std::string* client_capabilities() const { 142 const std::string* client_capabilities() const {
145 return client_capabilities_.get(); 143 return client_capabilities_.get();
146 } 144 }
147 145
146 // Registers a DataChannelManager callback for testing.
147 void RegisterDataChannelManagerCallbackForTesting(
joedow 2017/07/10 23:36:45 nit: RegisterDataChannelManagerCallbackForTesting
Hzj_jie 2017/07/11 01:11:15 Done.
148 const std::string& prefix,
149 protocol::DataChannelManager::CreateHandlerCallback constructor);
150
148 void SetEventTimestampsSourceForTests( 151 void SetEventTimestampsSourceForTests(
149 scoped_refptr<protocol::InputEventTimestampsSource> 152 scoped_refptr<protocol::InputEventTimestampsSource>
150 event_timestamp_source); 153 event_timestamp_source);
151 154
152 private: 155 private:
153 // Creates a proxy for sending clipboard events to the client. 156 // Creates a proxy for sending clipboard events to the client.
154 std::unique_ptr<protocol::ClipboardStub> CreateClipboardProxy(); 157 std::unique_ptr<protocol::ClipboardStub> CreateClipboardProxy();
155 158
156 // protocol::VideoStream::Observer implementation. 159 // protocol::VideoStream::Observer implementation.
157 void OnVideoSizeChanged(protocol::VideoStream* stream, 160 void OnVideoSizeChanged(protocol::VideoStream* stream,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Used to disable callbacks to |this| once DisconnectSession() has been 265 // Used to disable callbacks to |this| once DisconnectSession() has been
263 // called. 266 // called.
264 base::WeakPtrFactory<ClientSessionControl> weak_factory_; 267 base::WeakPtrFactory<ClientSessionControl> weak_factory_;
265 268
266 DISALLOW_COPY_AND_ASSIGN(ClientSession); 269 DISALLOW_COPY_AND_ASSIGN(ClientSession);
267 }; 270 };
268 271
269 } // namespace remoting 272 } // namespace remoting
270 273
271 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 274 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698