OLD | NEW |
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 #include "ash/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "ui/gfx/display.h" | 37 #include "ui/gfx/display.h" |
38 #include "ui/gfx/screen.h" | 38 #include "ui/gfx/screen.h" |
39 | 39 |
40 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
41 #include "base/chromeos/chromeos_version.h" | 41 #include "base/chromeos/chromeos_version.h" |
42 #include "base/time/time.h" | 42 #include "base/time/time.h" |
43 #if defined(USE_X11) | 43 #if defined(USE_X11) |
44 #include "ash/display/output_configurator_animation.h" | 44 #include "ash/display/output_configurator_animation.h" |
45 #include "chromeos/display/output_configurator.h" | 45 #include "chromeos/display/output_configurator.h" |
46 #include "ui/base/x/x11_util.h" | 46 #include "ui/base/x/x11_util.h" |
| 47 #include "ui/gfx/x/x11_types.h" |
47 | 48 |
48 // Including this at the bottom to avoid other | 49 // Including this at the bottom to avoid other |
49 // potential conflict with chrome headers. | 50 // potential conflict with chrome headers. |
50 #include <X11/extensions/Xrandr.h> | 51 #include <X11/extensions/Xrandr.h> |
51 #undef RootWindow | 52 #undef RootWindow |
52 #endif // defined(USE_X11) | 53 #endif // defined(USE_X11) |
53 #endif // defined(OS_CHROMEOS) | 54 #endif // defined(OS_CHROMEOS) |
54 | 55 |
55 namespace ash { | 56 namespace ash { |
56 namespace { | 57 namespace { |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 #if defined(USE_X11) | 818 #if defined(USE_X11) |
818 // crbug.com/120229 - set the window title for the primary dislpay | 819 // crbug.com/120229 - set the window title for the primary dislpay |
819 // to "aura_root_0" so gtalk can find the primary root window to broadcast. | 820 // to "aura_root_0" so gtalk can find the primary root window to broadcast. |
820 // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting. | 821 // TODO(jhorwich) Remove this once Chrome supports window-based broadcasting. |
821 aura::RootWindow* primary = Shell::GetPrimaryRootWindow(); | 822 aura::RootWindow* primary = Shell::GetPrimaryRootWindow(); |
822 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 823 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
823 for (size_t i = 0; i < root_windows.size(); ++i) { | 824 for (size_t i = 0; i < root_windows.size(); ++i) { |
824 std::string name = | 825 std::string name = |
825 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; | 826 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; |
826 gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget(); | 827 gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget(); |
827 XStoreName(ui::GetXDisplay(), xwindow, name.c_str()); | 828 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); |
828 } | 829 } |
829 #endif | 830 #endif |
830 } | 831 } |
831 | 832 |
832 } // namespace ash | 833 } // namespace ash |
OLD | NEW |