From 34f9c388068177a32b42c9ac72045f87c0bb9b33 Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Wed, 19 May 2010 23:32:06 +0000 Subject: chromeos: Add _CHROME_LOGGED_IN property on root window. This gets set to either 1 or 0 depending on whether the user is currently logged in or not. I'm doing this as a step towards using the same window manager process during and after login; this will let the WM know which log file it should be using, for instance. BUG=chromium-os:2790 TEST=tried it, and will add an autotest for this soon Review URL: http://codereview.chromium.org/2078017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47748 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/wm_ipc.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'chrome/browser/chromeos/wm_ipc.h') diff --git a/chrome/browser/chromeos/wm_ipc.h b/chrome/browser/chromeos/wm_ipc.h index 8c4aba5..f7381ee 100644 --- a/chrome/browser/chromeos/wm_ipc.h +++ b/chrome/browser/chromeos/wm_ipc.h @@ -22,18 +22,13 @@ namespace chromeos { class WmIpc { public: enum AtomType { - ATOM_CHROME_WINDOW_TYPE = 0, + ATOM_CHROME_LOGGED_IN = 0, + ATOM_CHROME_WINDOW_TYPE, ATOM_CHROME_WM_MESSAGE, ATOM_MANAGER, - ATOM_NET_SUPPORTING_WM_CHECK, - ATOM_NET_WM_NAME, - ATOM_PRIMARY, ATOM_STRING, ATOM_UTF8_STRING, - ATOM_WM_NORMAL_HINTS, ATOM_WM_S0, - ATOM_WM_STATE, - ATOM_WM_TRANSIENT_FOR, ATOM_WM_SYSTEM_METRICS, kNumAtoms, }; @@ -86,7 +81,7 @@ class WmIpc { // Returns the single instance of WmIpc. static WmIpc* instance(); - // Get or set a property describing a window's type. + // Gets or sets a property describing a window's type. // WmIpcMessageType is defined in chromeos_wm_ipc_enums.h. Type-specific // parameters may also be supplied. The caller is responsible for trapping // errors from the X server. @@ -111,12 +106,16 @@ class WmIpc { // returned. If false is returned, |event| is not a valid StringMessage. bool DecodeStringMessage(const GdkEventProperty& event, std::string* msg); - // Handle ClientMessage events that weren't decodable using DecodeMessage(). + // Handles ClientMessage events that weren't decodable using DecodeMessage(). // Specifically, this catches messages about the WM_S0 selection that get sent // when a window manager process starts (so that we can re-run InitWmInfo()). // See ICCCM 2.8 for more info about MANAGER selections. void HandleNonChromeClientMessageEvent(const GdkEventClient& event); + // Sets a _CHROME_LOGGED_IN property on the root window describing whether + // the user is currently logged in or not. + void SetLoggedInProperty(bool logged_in); + private: friend struct DefaultSingletonTraits; -- cgit v1.1