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

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

Issue 398873005: Preparations for Cast Host Extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 12 matching lines...) Expand all
23 #include "remoting/protocol/clipboard_echo_filter.h" 23 #include "remoting/protocol/clipboard_echo_filter.h"
24 #include "remoting/protocol/clipboard_filter.h" 24 #include "remoting/protocol/clipboard_filter.h"
25 #include "remoting/protocol/clipboard_stub.h" 25 #include "remoting/protocol/clipboard_stub.h"
26 #include "remoting/protocol/connection_to_client.h" 26 #include "remoting/protocol/connection_to_client.h"
27 #include "remoting/protocol/host_stub.h" 27 #include "remoting/protocol/host_stub.h"
28 #include "remoting/protocol/input_event_tracker.h" 28 #include "remoting/protocol/input_event_tracker.h"
29 #include "remoting/protocol/input_filter.h" 29 #include "remoting/protocol/input_filter.h"
30 #include "remoting/protocol/input_stub.h" 30 #include "remoting/protocol/input_stub.h"
31 #include "remoting/protocol/pairing_registry.h" 31 #include "remoting/protocol/pairing_registry.h"
32 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 32 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
33 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
33 34
34 namespace base { 35 namespace base {
35 class SingleThreadTaskRunner; 36 class SingleThreadTaskRunner;
36 } // namespace base 37 } // namespace base
37 38
38 namespace remoting { 39 namespace remoting {
39 40
40 class AudioEncoder; 41 class AudioEncoder;
41 class AudioScheduler; 42 class AudioScheduler;
42 class DesktopEnvironment; 43 class DesktopEnvironment;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 protocol::ConnectionToClient* connection() const { 159 protocol::ConnectionToClient* connection() const {
159 return connection_.get(); 160 return connection_.get();
160 } 161 }
161 162
162 bool is_authenticated() { return auth_input_filter_.enabled(); } 163 bool is_authenticated() { return auth_input_filter_.enabled(); }
163 164
164 const std::string* client_capabilities() const { 165 const std::string* client_capabilities() const {
165 return client_capabilities_.get(); 166 return client_capabilities_.get();
166 } 167 }
167 168
169 void set_enable_cast(bool enable) { enable_cast_ = enable; }
170
171 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner() {
172 return network_task_runner_;
173 }
174 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner() {
175 return video_capture_task_runner_;
176 }
177 scoped_ptr<webrtc::ScreenCapturer> RequestScreenCapturer() {
178 return screen_capturer_.Pass();
aiguha 2014/07/17 01:49:23 TODO(aiguha): Discuss with sergeyu@ a better desig
179 }
aiguha 2014/07/17 01:49:23 CastExtensionSession's constructor receives a poin
180
168 private: 181 private:
169 typedef ScopedVector<HostExtensionSession> HostExtensionSessionList; 182 typedef ScopedVector<HostExtensionSession> HostExtensionSessionList;
170 183
171 // Creates a proxy for sending clipboard events to the client. 184 // Creates a proxy for sending clipboard events to the client.
172 scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy(); 185 scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy();
173 186
174 // Creates an audio encoder for the specified configuration. 187 // Creates an audio encoder for the specified configuration.
175 static scoped_ptr<AudioEncoder> CreateAudioEncoder( 188 static scoped_ptr<AudioEncoder> CreateAudioEncoder(
176 const protocol::SessionConfig& config); 189 const protocol::SessionConfig& config);
177 190
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 272
260 // The pairing registry for PIN-less authentication. 273 // The pairing registry for PIN-less authentication.
261 scoped_refptr<protocol::PairingRegistry> pairing_registry_; 274 scoped_refptr<protocol::PairingRegistry> pairing_registry_;
262 275
263 // Used to proxy gnubby auth traffic. 276 // Used to proxy gnubby auth traffic.
264 scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_; 277 scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_;
265 278
266 // Host extension sessions, used to handle extension messages. 279 // Host extension sessions, used to handle extension messages.
267 HostExtensionSessionList extension_sessions_; 280 HostExtensionSessionList extension_sessions_;
268 281
282 // True if cast mode is enabled.
283 bool enable_cast_;
284
285 // Used to capture screens. This is a class member to allow external objects,
286 // like CastExtensionSession, to request it when needed.
287 scoped_ptr<webrtc::ScreenCapturer> screen_capturer_;
288
269 DISALLOW_COPY_AND_ASSIGN(ClientSession); 289 DISALLOW_COPY_AND_ASSIGN(ClientSession);
270 }; 290 };
271 291
272 } // namespace remoting 292 } // namespace remoting
273 293
274 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 294 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698