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

Side by Side Diff: base/win_util.h

Issue 21274: Add code to be able to detect windows7 in GetWinVersion. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « no previous file | base/win_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 BASE_WIN_UTIL_H__ 5 #ifndef BASE_WIN_UTIL_H__
6 #define BASE_WIN_UTIL_H__ 6 #define BASE_WIN_UTIL_H__
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <aclapi.h> 9 #include <aclapi.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/tracked.h" 13 #include "base/tracked.h"
14 14
15 namespace win_util { 15 namespace win_util {
16 16
17 // NOTE: Keep these in order so callers can do things like 17 // NOTE: Keep these in order so callers can do things like
18 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, 18 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values,
19 // though. 19 // though.
20 enum WinVersion { 20 enum WinVersion {
21 WINVERSION_PRE_2000 = 0, // Not supported 21 WINVERSION_PRE_2000 = 0, // Not supported
22 WINVERSION_2000 = 1, 22 WINVERSION_2000 = 1,
23 WINVERSION_XP = 2, 23 WINVERSION_XP = 2,
24 WINVERSION_SERVER_2003 = 3, 24 WINVERSION_SERVER_2003 = 3,
25 WINVERSION_VISTA = 4, 25 WINVERSION_VISTA = 4,
26 WINVERSION_2008 = 5,
27 WINVERSION_WIN7 = 6,
26 }; 28 };
27 29
28 void GetNonClientMetrics(NONCLIENTMETRICS* metrics); 30 void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
29 31
30 // Returns the running version of Windows. 32 // Returns the running version of Windows.
31 WinVersion GetWinVersion(); 33 WinVersion GetWinVersion();
32 34
33 // Returns the major and minor version of the service pack installed. 35 // Returns the major and minor version of the service pack installed.
34 void GetServicePackLevel(int* major, int* minor); 36 void GetServicePackLevel(int* major, int* minor);
35 37
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #else 119 #else
118 #define TRACK_HWND_CREATION(hwnd) win_util::NotifyHWNDCreation(FROM_HERE, hwnd) 120 #define TRACK_HWND_CREATION(hwnd) win_util::NotifyHWNDCreation(FROM_HERE, hwnd)
119 #define TRACK_HWND_DESTRUCTION(hwnd) \ 121 #define TRACK_HWND_DESTRUCTION(hwnd) \
120 win_util::NotifyHWNDDestruction(FROM_HERE, hwnd) 122 win_util::NotifyHWNDDestruction(FROM_HERE, hwnd)
121 #endif 123 #endif
122 124
123 } // namespace win_util 125 } // namespace win_util
124 126
125 #endif // BASE_WIN_UTIL_H__ 127 #endif // BASE_WIN_UTIL_H__
126 128
OLDNEW
« no previous file with comments | « no previous file | base/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698