| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <X11/keysym.h> | 5 #include <X11/keysym.h> |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 | 7 |
| 8 // X macro fail. | 8 // X macro fail. |
| 9 #if defined(RootWindow) | 9 #if defined(RootWindow) |
| 10 #undef RootWindow | 10 #undef RootWindow |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "ui/aura/client/screen_position_client.h" | 15 #include "ui/aura/client/screen_position_client.h" |
| 16 #include "ui/aura/env.h" | 16 #include "ui/aura/env.h" |
| 17 #include "ui/aura/test/ui_controls_factory_aura.h" | 17 #include "ui/aura/test/ui_controls_factory_aura.h" |
| 18 #include "ui/aura/window_event_dispatcher.h" | 18 #include "ui/aura/window_event_dispatcher.h" |
| 19 #include "ui/base/test/ui_controls_aura.h" | 19 #include "ui/base/test/ui_controls_aura.h" |
| 20 #include "ui/base/x/x11_util.h" | 20 #include "ui/base/x/x11_util.h" |
| 21 #include "ui/compositor/dip_util.h" | 21 #include "ui/compositor/dip_util.h" |
| 22 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 22 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
| 23 #include "ui/events/test/platform_event_waiter.h" | 23 #include "ui/events/test/platform_event_waiter.h" |
| 24 #include "ui/gfx/x/x11_connection.h" | |
| 25 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 24 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 26 | 25 |
| 27 namespace views { | 26 namespace views { |
| 28 namespace test { | 27 namespace test { |
| 29 namespace { | 28 namespace { |
| 30 | 29 |
| 31 using ui_controls::DOWN; | 30 using ui_controls::DOWN; |
| 32 using ui_controls::LEFT; | 31 using ui_controls::LEFT; |
| 33 using ui_controls::MIDDLE; | 32 using ui_controls::MIDDLE; |
| 34 using ui_controls::MouseButton; | 33 using ui_controls::MouseButton; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 273 |
| 275 // Input-only window used for events. | 274 // Input-only window used for events. |
| 276 ::Window x_window_; | 275 ::Window x_window_; |
| 277 | 276 |
| 278 DISALLOW_COPY_AND_ASSIGN(UIControlsDesktopX11); | 277 DISALLOW_COPY_AND_ASSIGN(UIControlsDesktopX11); |
| 279 }; | 278 }; |
| 280 | 279 |
| 281 } // namespace | 280 } // namespace |
| 282 | 281 |
| 283 UIControlsAura* CreateUIControlsDesktopAura() { | 282 UIControlsAura* CreateUIControlsDesktopAura() { |
| 284 // The constructor of UIControlsDesktopX11 needs X11 connection to be | 283 // The constructor of UIControlsDesktopX11 needs XInitThreads to be called. |
| 285 // initialized. | 284 XInitThreads(); |
| 286 gfx::InitializeThreadedX11(); | |
| 287 return new UIControlsDesktopX11(); | 285 return new UIControlsDesktopX11(); |
| 288 } | 286 } |
| 289 | 287 |
| 290 } // namespace test | 288 } // namespace test |
| 291 } // namespace views | 289 } // namespace views |
| OLD | NEW |