| 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" |
| 24 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 25 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 25 | 26 |
| 26 namespace views { | 27 namespace views { |
| 27 namespace test { | 28 namespace test { |
| 28 namespace { | 29 namespace { |
| 29 | 30 |
| 30 using ui_controls::DOWN; | 31 using ui_controls::DOWN; |
| 31 using ui_controls::LEFT; | 32 using ui_controls::LEFT; |
| 32 using ui_controls::MIDDLE; | 33 using ui_controls::MIDDLE; |
| 33 using ui_controls::MouseButton; | 34 using ui_controls::MouseButton; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 274 |
| 274 // Input-only window used for events. | 275 // Input-only window used for events. |
| 275 ::Window x_window_; | 276 ::Window x_window_; |
| 276 | 277 |
| 277 DISALLOW_COPY_AND_ASSIGN(UIControlsDesktopX11); | 278 DISALLOW_COPY_AND_ASSIGN(UIControlsDesktopX11); |
| 278 }; | 279 }; |
| 279 | 280 |
| 280 } // namespace | 281 } // namespace |
| 281 | 282 |
| 282 UIControlsAura* CreateUIControlsDesktopAura() { | 283 UIControlsAura* CreateUIControlsDesktopAura() { |
| 283 // The constructor of UIControlsDesktopX11 needs XInitThreads to be called. | 284 // The constructor of UIControlsDesktopX11 needs X11 connection to be |
| 284 XInitThreads(); | 285 // initialized. |
| 286 gfx::InitializeThreadedX11(); |
| 285 return new UIControlsDesktopX11(); | 287 return new UIControlsDesktopX11(); |
| 286 } | 288 } |
| 287 | 289 |
| 288 } // namespace test | 290 } // namespace test |
| 289 } // namespace views | 291 } // namespace views |
| OLD | NEW |