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

Side by Side Diff: webrtc/base/window.h

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 | « webrtc/base/win32socketserver_unittest.cc ('k') | webrtc/base/winping.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 22 matching lines...) Expand all
33 #if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) 33 #if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
34 typedef Window WindowT; 34 typedef Window WindowT;
35 #elif defined(WEBRTC_WIN) 35 #elif defined(WEBRTC_WIN)
36 typedef HWND WindowT; 36 typedef HWND WindowT;
37 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) 37 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
38 typedef CGWindowID WindowT; 38 typedef CGWindowID WindowT;
39 #else 39 #else
40 typedef unsigned int WindowT; 40 typedef unsigned int WindowT;
41 #endif 41 #endif
42 42
43 static WindowId Cast(uint64 id) { 43 static WindowId Cast(uint64_t id) {
44 #if defined(WEBRTC_WIN) 44 #if defined(WEBRTC_WIN)
45 return WindowId(reinterpret_cast<WindowId::WindowT>(id)); 45 return WindowId(reinterpret_cast<WindowId::WindowT>(id));
46 #else 46 #else
47 return WindowId(static_cast<WindowId::WindowT>(id)); 47 return WindowId(static_cast<WindowId::WindowT>(id));
48 #endif 48 #endif
49 } 49 }
50 50
51 static uint64 Format(const WindowT& id) { 51 static uint64_t Format(const WindowT& id) {
52 #if defined(WEBRTC_WIN) 52 #if defined(WEBRTC_WIN)
53 return static_cast<uint64>(reinterpret_cast<uintptr_t>(id)); 53 return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(id));
54 #else 54 #else
55 return static_cast<uint64>(id); 55 return static_cast<uint64_t>(id);
56 #endif 56 #endif
57 } 57 }
58 58
59 WindowId() : id_(0) {} 59 WindowId() : id_(0) {}
60 WindowId(const WindowT& id) : id_(id) {} // NOLINT 60 WindowId(const WindowT& id) : id_(id) {} // NOLINT
61 const WindowT& id() const { return id_; } 61 const WindowT& id() const { return id_; }
62 bool IsValid() const { return id_ != 0; } 62 bool IsValid() const { return id_ != 0; }
63 bool Equals(const WindowId& other) const { 63 bool Equals(const WindowId& other) const {
64 return id_ == other.id(); 64 return id_ == other.id();
65 } 65 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 WE_RESTORE = 3, 116 WE_RESTORE = 3,
117 }; 117 };
118 118
119 inline std::string ToString(const WindowId& window) { 119 inline std::string ToString(const WindowId& window) {
120 return ToString(window.id()); 120 return ToString(window.id());
121 } 121 }
122 122
123 } // namespace rtc 123 } // namespace rtc
124 124
125 #endif // WEBRTC_BASE_WINDOW_H_ 125 #endif // WEBRTC_BASE_WINDOW_H_
OLDNEW
« no previous file with comments | « webrtc/base/win32socketserver_unittest.cc ('k') | webrtc/base/winping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698