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/compositor/compositor.h" | 37 #include "ui/compositor/compositor.h" |
38 #include "ui/compositor/compositor_vsync_manager.h" | 38 #include "ui/compositor/compositor_vsync_manager.h" |
39 #include "ui/gfx/display.h" | 39 #include "ui/gfx/display.h" |
40 #include "ui/gfx/screen.h" | 40 #include "ui/gfx/screen.h" |
41 #include "ui/wm/public/activation_client.h" | 41 #include "ui/wm/public/activation_client.h" |
42 | 42 |
43 #if defined(OS_CHROMEOS) | 43 #if defined(OS_CHROMEOS) |
44 #include "ash/display/display_configurator_animation.h" | 44 #include "ash/display/display_configurator_animation.h" |
45 #include "base/sys_info.h" | 45 #include "base/sys_info.h" |
46 #include "base/time/time.h" | 46 #include "base/time/time.h" |
| 47 #endif // defined(OS_CHROMEOS) |
| 48 |
47 #if defined(USE_X11) | 49 #if defined(USE_X11) |
48 #include "ui/base/x/x11_util.h" | 50 #include "ui/base/x/x11_util.h" |
49 #include "ui/gfx/x/x11_types.h" | 51 #include "ui/gfx/x/x11_types.h" |
50 | 52 |
51 // Including this at the bottom to avoid other | 53 // Including this at the bottom to avoid other |
52 // potential conflict with chrome headers. | 54 // potential conflict with chrome headers. |
53 #include <X11/extensions/Xrandr.h> | 55 #include <X11/extensions/Xrandr.h> |
54 #undef RootWindow | 56 #undef RootWindow |
55 #endif // defined(USE_X11) | 57 #endif // defined(USE_X11) |
56 #endif // defined(OS_CHROMEOS) | 58 |
57 | 59 |
58 namespace ash { | 60 namespace ash { |
59 namespace { | 61 namespace { |
60 | 62 |
61 // Primary display stored in global object as it can be | 63 // Primary display stored in global object as it can be |
62 // accessed after Shell is deleted. A separate display instance is created | 64 // accessed after Shell is deleted. A separate display instance is created |
63 // during the shutdown instead of always keeping two display instances | 65 // during the shutdown instead of always keeping two display instances |
64 // (one here and another one in display_manager) in sync, which is error prone. | 66 // (one here and another one in display_manager) in sync, which is error prone. |
65 // This is initialized in the constructor, and then in CreatePrimaryHost(). | 67 // This is initialized in the constructor, and then in CreatePrimaryHost(). |
66 int64 primary_display_id = -1; | 68 int64 primary_display_id = -1; |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 std::string name = | 757 std::string name = |
756 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; | 758 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; |
757 gfx::AcceleratedWidget xwindow = | 759 gfx::AcceleratedWidget xwindow = |
758 root_windows[i]->GetHost()->GetAcceleratedWidget(); | 760 root_windows[i]->GetHost()->GetAcceleratedWidget(); |
759 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); | 761 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); |
760 } | 762 } |
761 #endif | 763 #endif |
762 } | 764 } |
763 | 765 |
764 } // namespace ash | 766 } // namespace ash |
OLD | NEW |