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

Side by Side Diff: base/nix/xdg_util.h

Issue 10735034: Linux: Detect Unity as a desktop environment. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 5 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/nix/xdg_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) 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 BASE_NIX_XDG_UTIL_H_ 5 #ifndef BASE_NIX_XDG_UTIL_H_
6 #define BASE_NIX_XDG_UTIL_H_ 6 #define BASE_NIX_XDG_UTIL_H_
7 7
8 // XDG refers to http://en.wikipedia.org/wiki/Freedesktop.org . 8 // XDG refers to http://en.wikipedia.org/wiki/Freedesktop.org .
9 // This file contains utilities found across free desktop environments. 9 // This file contains utilities found across free desktop environments.
10 // 10 //
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 BASE_EXPORT FilePath GetXDGUserDirectory(const char* dir_name, 46 BASE_EXPORT FilePath GetXDGUserDirectory(const char* dir_name,
47 const char* fallback_dir); 47 const char* fallback_dir);
48 48
49 enum DesktopEnvironment { 49 enum DesktopEnvironment {
50 DESKTOP_ENVIRONMENT_OTHER, 50 DESKTOP_ENVIRONMENT_OTHER,
51 DESKTOP_ENVIRONMENT_GNOME, 51 DESKTOP_ENVIRONMENT_GNOME,
52 // KDE3 and KDE4 are sufficiently different that we count 52 // KDE3 and KDE4 are sufficiently different that we count
53 // them as two different desktop environments here. 53 // them as two different desktop environments here.
54 DESKTOP_ENVIRONMENT_KDE3, 54 DESKTOP_ENVIRONMENT_KDE3,
55 DESKTOP_ENVIRONMENT_KDE4, 55 DESKTOP_ENVIRONMENT_KDE4,
56 DESKTOP_ENVIRONMENT_UNITY,
56 DESKTOP_ENVIRONMENT_XFCE, 57 DESKTOP_ENVIRONMENT_XFCE,
57 }; 58 };
58 59
59 // Return an entry from the DesktopEnvironment enum with a best guess 60 // Return an entry from the DesktopEnvironment enum with a best guess
60 // of which desktop environment we're using. We use this to know when 61 // of which desktop environment we're using. We use this to know when
61 // to attempt to use preferences from the desktop environment -- 62 // to attempt to use preferences from the desktop environment --
62 // proxy settings, password manager, etc. 63 // proxy settings, password manager, etc.
63 BASE_EXPORT DesktopEnvironment GetDesktopEnvironment(Environment* env); 64 BASE_EXPORT DesktopEnvironment GetDesktopEnvironment(Environment* env);
64 65
65 // Return a string representation of the given desktop environment. 66 // Return a string representation of the given desktop environment.
66 // May return NULL in the case of DESKTOP_ENVIRONMENT_OTHER. 67 // May return NULL in the case of DESKTOP_ENVIRONMENT_OTHER.
67 BASE_EXPORT const char* GetDesktopEnvironmentName(DesktopEnvironment env); 68 BASE_EXPORT const char* GetDesktopEnvironmentName(DesktopEnvironment env);
68 // Convenience wrapper that calls GetDesktopEnvironment() first. 69 // Convenience wrapper that calls GetDesktopEnvironment() first.
69 BASE_EXPORT const char* GetDesktopEnvironmentName(Environment* env); 70 BASE_EXPORT const char* GetDesktopEnvironmentName(Environment* env);
70 71
71 } // namespace nix 72 } // namespace nix
72 } // namespace base 73 } // namespace base
73 74
74 #endif // BASE_NIX_XDG_UTIL_H_ 75 #endif // BASE_NIX_XDG_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/nix/xdg_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698