OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 // This file defines utility functions that can report details about the | |
6 // host operating environment. | |
7 | |
8 #ifndef CHROME_COMMON_ENV_UTIL_H__ | |
9 #define CHROME_COMMON_ENV_UTIL_H__ | |
10 | |
11 #include <windows.h> | |
12 #include <string> | |
13 | |
14 namespace env_util { | |
15 | |
16 // Test if the given environment variable is defined. | |
17 inline bool HasEnvironmentVariable(const wchar_t* var) { | |
18 return GetEnvironmentVariable(var, NULL, 0) != 0; | |
19 } | |
20 | |
21 // Returns the name of the host operating system. | |
22 std::string GetOperatingSystemName(); | |
23 | |
24 // Returns the version of the host operating system. | |
25 std::string GetOperatingSystemVersion(); | |
26 | |
27 // Returns the CPU architecture of the system. | |
28 std::string GetCPUArchitecture(); | |
29 | |
30 // Returns the pixel dimensions of the primary display via the | |
31 // width and height parameters. | |
32 void GetPrimaryDisplayDimensions(int* width, int* height); | |
33 | |
34 // Return the number of displays. | |
35 int GetDisplayCount(); | |
36 | |
37 } // namespace env_util | |
38 | |
39 #endif // CHROME_COMMON_ENV_UTIL_H__ | |
40 | |
OLD | NEW |