Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BASE_CHROMOTING_EVENT_H_ | 5 #ifndef REMOTING_BASE_CHROMOTING_EVENT_H_ |
| 6 #define REMOTING_BASE_CHROMOTING_EVENT_H_ | 6 #define REMOTING_BASE_CHROMOTING_EVENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 RESTART = 7, | 85 RESTART = 7, |
| 86 HOST_STATUS = 8, | 86 HOST_STATUS = 8, |
| 87 SIGNAL_STRATEGY_PROGRESS = 9 | 87 SIGNAL_STRATEGY_PROGRESS = 9 |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 static const char kCaptureLatencyKey[]; | 90 static const char kCaptureLatencyKey[]; |
| 91 static const char kConnectionErrorKey[]; | 91 static const char kConnectionErrorKey[]; |
| 92 static const char kCpuKey[]; | 92 static const char kCpuKey[]; |
| 93 static const char kDecodeLatencyKey[]; | 93 static const char kDecodeLatencyKey[]; |
| 94 static const char kEncodeLatencyKey[]; | 94 static const char kEncodeLatencyKey[]; |
| 95 static const char kHostOsKey[]; | |
| 96 static const char kHostOsVersionKey[]; | |
| 97 static const char kHostVersionKey[]; | |
| 95 static const char kMaxCaptureLatencyKey[]; | 98 static const char kMaxCaptureLatencyKey[]; |
| 96 static const char kMaxDecodeLatencyKey[]; | 99 static const char kMaxDecodeLatencyKey[]; |
| 97 static const char kMaxEncodeLatencyKey[]; | 100 static const char kMaxEncodeLatencyKey[]; |
| 98 static const char kMaxRenderLatencyKey[]; | 101 static const char kMaxRenderLatencyKey[]; |
| 99 static const char kMaxRoundtripLatencyKey[]; | 102 static const char kMaxRoundtripLatencyKey[]; |
| 100 static const char kModeKey[]; | 103 static const char kModeKey[]; |
| 101 static const char kOsKey[]; | 104 static const char kOsKey[]; |
| 102 static const char kOsVersionKey[]; | 105 static const char kOsVersionKey[]; |
| 103 static const char kRenderLatencyKey[]; | 106 static const char kRenderLatencyKey[]; |
| 104 static const char kRoleKey[]; | 107 static const char kRoleKey[]; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 135 | 138 |
| 136 void IncrementSendAttempts(); | 139 void IncrementSendAttempts(); |
| 137 int send_attempts() const { return send_attempts_; } | 140 int send_attempts() const { return send_attempts_; } |
| 138 | 141 |
| 139 // Returns a copy of the internal dictionary value. | 142 // Returns a copy of the internal dictionary value. |
| 140 std::unique_ptr<base::DictionaryValue> CopyDictionaryValue() const; | 143 std::unique_ptr<base::DictionaryValue> CopyDictionaryValue() const; |
| 141 | 144 |
| 142 // Returns true if the SessionState concludes the end of session. | 145 // Returns true if the SessionState concludes the end of session. |
| 143 static bool IsEndOfSession(SessionState state); | 146 static bool IsEndOfSession(SessionState state); |
| 144 | 147 |
| 148 // Converts the OS type String into the enum value. | |
| 149 static Os toOs(const std::string& os); | |
|
Sergey Ulanov
2017/01/13 00:23:17
Maybe call it ParseOsFromString() or something lik
Yuwei
2017/01/13 01:51:12
Done.
| |
| 150 | |
| 145 private: | 151 private: |
| 146 std::unique_ptr<base::DictionaryValue> values_map_; | 152 std::unique_ptr<base::DictionaryValue> values_map_; |
| 147 | 153 |
| 148 int send_attempts_ = 0; | 154 int send_attempts_ = 0; |
| 149 }; | 155 }; |
| 150 | 156 |
| 151 } // namespace remoting | 157 } // namespace remoting |
| 152 | 158 |
| 153 #endif // REMOTING_BASE_CHROMOTING_EVENT_H_ | 159 #endif // REMOTING_BASE_CHROMOTING_EVENT_H_ |
| OLD | NEW |