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

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

Powered by Google App Engine
This is Rietveld 408576698