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

Side by Side Diff: chrome/browser/chromeos/wm_ipc.cc

Issue 6047005: chromeos: Notify window manager about signout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS already updated Created 9 years, 12 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 | « chrome/browser/chromeos/wm_ipc.h ('k') | chrome/browser/ui/browser_list.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/wm_ipc.h" 5 #include "chrome/browser/chromeos/wm_ipc.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 extern "C" { 8 extern "C" {
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 } 10 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void WmIpc::SetLoggedInProperty(bool logged_in) { 158 void WmIpc::SetLoggedInProperty(bool logged_in) {
159 std::vector<int> values; 159 std::vector<int> values;
160 values.push_back(static_cast<int>(logged_in)); 160 values.push_back(static_cast<int>(logged_in));
161 SetIntProperty(gdk_x11_get_default_root_xwindow(), 161 SetIntProperty(gdk_x11_get_default_root_xwindow(),
162 type_to_atom_[ATOM_CHROME_LOGGED_IN], 162 type_to_atom_[ATOM_CHROME_LOGGED_IN],
163 values); 163 values);
164 } 164 }
165 165
166 void WmIpc::NotifyAboutSignout() {
167 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_SIGNING_OUT);
168 SendMessage(msg);
169 }
170
166 WmIpc::WmIpc() { 171 WmIpc::WmIpc() {
167 scoped_array<char*> names(new char*[kNumAtoms]); 172 scoped_array<char*> names(new char*[kNumAtoms]);
168 scoped_array<Atom> atoms(new Atom[kNumAtoms]); 173 scoped_array<Atom> atoms(new Atom[kNumAtoms]);
169 174
170 for (int i = 0; i < kNumAtoms; ++i) { 175 for (int i = 0; i < kNumAtoms; ++i) {
171 // Need to const_cast because XInternAtoms() wants a char**. 176 // Need to const_cast because XInternAtoms() wants a char**.
172 names[i] = const_cast<char*>(kAtomInfos[i].name); 177 names[i] = const_cast<char*>(kAtomInfos[i].name);
173 } 178 }
174 179
175 XInternAtoms(x11_util::GetXDisplay(), names.get(), kNumAtoms, 180 XInternAtoms(x11_util::GetXDisplay(), names.get(), kNumAtoms,
(...skipping 24 matching lines...) Expand all
200 // Let the window manager know which version of the IPC messages we support. 205 // Let the window manager know which version of the IPC messages we support.
201 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_IPC_VERSION); 206 Message msg(chromeos::WM_IPC_MESSAGE_WM_NOTIFY_IPC_VERSION);
202 // TODO: The version number is the latest listed in wm_ipc.h -- 207 // TODO: The version number is the latest listed in wm_ipc.h --
203 // ideally, once this header is shared between Chrome and the Chrome OS window 208 // ideally, once this header is shared between Chrome and the Chrome OS window
204 // manager, we'll just define the version statically in the header. 209 // manager, we'll just define the version statically in the header.
205 msg.set_param(0, 1); 210 msg.set_param(0, 1);
206 SendMessage(msg); 211 SendMessage(msg);
207 } 212 }
208 213
209 } // namespace chromeos 214 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/wm_ipc.h ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698