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

Side by Side Diff: remoting/protocol/session_config.h

Issue 13932020: Set the initial resolution of an RDP session to the client screen resolution if it is available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback #2 Created 7 years, 8 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 | Annotate | Revision Log
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_PROTOCOL_SESSION_CONFIG_H_ 5 #ifndef REMOTING_PROTOCOL_SESSION_CONFIG_H_
6 #define REMOTING_PROTOCOL_SESSION_CONFIG_H_ 6 #define REMOTING_PROTOCOL_SESSION_CONFIG_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 namespace protocol { 15 namespace protocol {
16 16
17 extern const int kDefaultStreamVersion; 17 extern const int kDefaultStreamVersion;
18 extern const int kCapabilitiesControlStreamVersion;
Sergey Ulanov 2013/04/16 08:38:53 This value would not need to be in the header if s
alexeypa (please no reviews) 2013/04/16 22:06:11 Done.
18 19
19 // Struct for configuration parameters of a single channel. 20 // Struct for configuration parameters of a single channel.
20 // Some channels (like video) may have multiple underlying sockets that need 21 // Some channels (like video) may have multiple underlying sockets that need
21 // to be configured simultaneously. 22 // to be configured simultaneously.
22 struct ChannelConfig { 23 struct ChannelConfig {
23 enum TransportType { 24 enum TransportType {
24 TRANSPORT_STREAM, 25 TRANSPORT_STREAM,
25 TRANSPORT_MUX_STREAM, 26 TRANSPORT_MUX_STREAM,
26 TRANSPORT_DATAGRAM, 27 TRANSPORT_DATAGRAM,
27 TRANSPORT_NONE, 28 TRANSPORT_NONE,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const ChannelConfig& video_config() const { return video_config_; } 76 const ChannelConfig& video_config() const { return video_config_; }
76 void set_audio_config(const ChannelConfig& audio_config) { 77 void set_audio_config(const ChannelConfig& audio_config) {
77 audio_config_ = audio_config; 78 audio_config_ = audio_config;
78 } 79 }
79 const ChannelConfig& audio_config() const { return audio_config_; } 80 const ChannelConfig& audio_config() const { return audio_config_; }
80 81
81 bool is_audio_enabled() const { 82 bool is_audio_enabled() const {
82 return audio_config_.transport != ChannelConfig::TRANSPORT_NONE; 83 return audio_config_.transport != ChannelConfig::TRANSPORT_NONE;
83 } 84 }
84 85
86 // Returns true if the control channel supports capabilities.
87 bool supports_capabilities() const {
88 return control_config_.version >= kCapabilitiesControlStreamVersion;
89 }
90
85 // Returns a suitable session configuration for use in tests. 91 // Returns a suitable session configuration for use in tests.
86 static SessionConfig ForTest(); 92 static SessionConfig ForTest();
87 93
88 private: 94 private:
89 ChannelConfig control_config_; 95 ChannelConfig control_config_;
90 ChannelConfig event_config_; 96 ChannelConfig event_config_;
91 ChannelConfig video_config_; 97 ChannelConfig video_config_;
92 ChannelConfig audio_config_; 98 ChannelConfig audio_config_;
93 }; 99 };
94 100
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 std::vector<ChannelConfig> control_configs_; 178 std::vector<ChannelConfig> control_configs_;
173 std::vector<ChannelConfig> event_configs_; 179 std::vector<ChannelConfig> event_configs_;
174 std::vector<ChannelConfig> video_configs_; 180 std::vector<ChannelConfig> video_configs_;
175 std::vector<ChannelConfig> audio_configs_; 181 std::vector<ChannelConfig> audio_configs_;
176 }; 182 };
177 183
178 } // namespace protocol 184 } // namespace protocol
179 } // namespace remoting 185 } // namespace remoting
180 186
181 #endif // REMOTING_PROTOCOL_SESSION_CONFIG_H_ 187 #endif // REMOTING_PROTOCOL_SESSION_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698