OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
11 } | 11 } |
12 | 12 |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "chrome/common/chrome_notification_types.h" |
16 #include "content/common/notification_service.h" | 17 #include "content/common/notification_service.h" |
17 #include "ui/base/x/x11_util.h" | 18 #include "ui/base/x/x11_util.h" |
18 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
19 | 20 |
20 using std::map; | 21 using std::map; |
21 using std::string; | 22 using std::string; |
22 | 23 |
23 namespace chromeos { | 24 namespace chromeos { |
24 | 25 |
25 namespace { | 26 namespace { |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } | 297 } |
297 | 298 |
298 void WmIpc::FetchLayoutModeProperty() { | 299 void WmIpc::FetchLayoutModeProperty() { |
299 int value = 0; | 300 int value = 0; |
300 if (ui::GetIntProperty( | 301 if (ui::GetIntProperty( |
301 gdk_x11_get_default_root_xwindow(), | 302 gdk_x11_get_default_root_xwindow(), |
302 GetAtomName(ATOM_CHROME_LAYOUT_MODE), | 303 GetAtomName(ATOM_CHROME_LAYOUT_MODE), |
303 &value)) { | 304 &value)) { |
304 layout_mode_ = static_cast<WmIpcLayoutMode>(value); | 305 layout_mode_ = static_cast<WmIpcLayoutMode>(value); |
305 NotificationService::current()->Notify( | 306 NotificationService::current()->Notify( |
306 NotificationType::LAYOUT_MODE_CHANGED, | 307 chrome::NOTIFICATION_LAYOUT_MODE_CHANGED, |
307 Source<WmIpc>(this), | 308 Source<WmIpc>(this), |
308 Details<WmIpcLayoutMode>(&layout_mode_)); | 309 Details<WmIpcLayoutMode>(&layout_mode_)); |
309 } else { | 310 } else { |
310 DLOG(WARNING) << "Missing _CHROME_LAYOUT_MODE property on root window"; | 311 DLOG(WARNING) << "Missing _CHROME_LAYOUT_MODE property on root window"; |
311 } | 312 } |
312 } | 313 } |
313 | 314 |
314 } // namespace chromeos | 315 } // namespace chromeos |
OLD | NEW |