OLD | NEW |
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_BASE_UTIL_H_ | 5 #ifndef REMOTING_BASE_UTIL_H_ |
6 #define REMOTING_BASE_UTIL_H_ | 6 #define REMOTING_BASE_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // Replaces every occurrence of "\n" in a string by "\r\n". | 87 // Replaces every occurrence of "\n" in a string by "\r\n". |
88 std::string ReplaceLfByCrLf(const std::string& in); | 88 std::string ReplaceLfByCrLf(const std::string& in); |
89 | 89 |
90 // Replaces every occurrence of "\r\n" in a string by "\n". | 90 // Replaces every occurrence of "\r\n" in a string by "\n". |
91 std::string ReplaceCrLfByLf(const std::string& in); | 91 std::string ReplaceCrLfByLf(const std::string& in); |
92 | 92 |
93 // Checks if the given string is a valid UTF-8 string. | 93 // Checks if the given string is a valid UTF-8 string. |
94 bool StringIsUtf8(const char* data, size_t length); | 94 bool StringIsUtf8(const char* data, size_t length); |
95 | 95 |
96 // Returns the username associated with this process, or the empty string on | |
97 // error or if not implemented. | |
98 std::string GetUsername(); | |
99 | |
100 bool DoesRectContain(const webrtc::DesktopRect& a, | 96 bool DoesRectContain(const webrtc::DesktopRect& a, |
101 const webrtc::DesktopRect& b); | 97 const webrtc::DesktopRect& b); |
102 | 98 |
103 } // namespace remoting | 99 } // namespace remoting |
104 | 100 |
105 #endif // REMOTING_BASE_UTIL_H_ | 101 #endif // REMOTING_BASE_UTIL_H_ |
OLD | NEW |