OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/host/ash_window_tree_host_x11.h" | 5 #include "ash/host/ash_window_tree_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/Xfixes.h> | |
8 #include <X11/extensions/XInput2.h> | |
9 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
10 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
11 | 9 #include <X11/extensions/XInput2.h> |
| 10 #include <X11/extensions/Xfixes.h> |
12 #include <string> | 11 #include <string> |
| 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "ash/host/ash_window_tree_host_init_params.h" | 15 #include "ash/host/ash_window_tree_host_init_params.h" |
16 #include "ash/host/ash_window_tree_host_unified.h" | 16 #include "ash/host/ash_window_tree_host_unified.h" |
17 #include "ash/host/root_window_transformer.h" | 17 #include "ash/host/root_window_transformer.h" |
18 #include "ash/ime/input_method_event_handler.h" | 18 #include "ash/ime/input_method_event_handler.h" |
19 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
20 #include "ui/aura/env.h" | 20 #include "ui/aura/env.h" |
21 #include "ui/aura/window.h" | 21 #include "ui/aura/window.h" |
22 #include "ui/aura/window_event_dispatcher.h" | 22 #include "ui/aura/window_event_dispatcher.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 XFixesDestroyPointerBarrier(xdisplay(), pointer_barriers_[1]); | 105 XFixesDestroyPointerBarrier(xdisplay(), pointer_barriers_[1]); |
106 XFixesDestroyPointerBarrier(xdisplay(), pointer_barriers_[2]); | 106 XFixesDestroyPointerBarrier(xdisplay(), pointer_barriers_[2]); |
107 XFixesDestroyPointerBarrier(xdisplay(), pointer_barriers_[3]); | 107 XFixesDestroyPointerBarrier(xdisplay(), pointer_barriers_[3]); |
108 pointer_barriers_.reset(); | 108 pointer_barriers_.reset(); |
109 } | 109 } |
110 #endif | 110 #endif |
111 } | 111 } |
112 | 112 |
113 void AshWindowTreeHostX11::SetRootWindowTransformer( | 113 void AshWindowTreeHostX11::SetRootWindowTransformer( |
114 scoped_ptr<RootWindowTransformer> transformer) { | 114 scoped_ptr<RootWindowTransformer> transformer) { |
115 transformer_helper_.SetRootWindowTransformer(transformer.Pass()); | 115 transformer_helper_.SetRootWindowTransformer(std::move(transformer)); |
116 if (pointer_barriers_) { | 116 if (pointer_barriers_) { |
117 UnConfineCursor(); | 117 UnConfineCursor(); |
118 ConfineCursorToRootWindow(); | 118 ConfineCursorToRootWindow(); |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 gfx::Insets AshWindowTreeHostX11::GetHostInsets() const { | 122 gfx::Insets AshWindowTreeHostX11::GetHostInsets() const { |
123 return transformer_helper_.GetHostInsets(); | 123 return transformer_helper_.GetHostInsets(); |
124 } | 124 } |
125 | 125 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 #endif | 291 #endif |
292 | 292 |
293 AshWindowTreeHost* AshWindowTreeHost::Create( | 293 AshWindowTreeHost* AshWindowTreeHost::Create( |
294 const AshWindowTreeHostInitParams& init_params) { | 294 const AshWindowTreeHostInitParams& init_params) { |
295 if (init_params.offscreen) | 295 if (init_params.offscreen) |
296 return new AshWindowTreeHostUnified(init_params.initial_bounds); | 296 return new AshWindowTreeHostUnified(init_params.initial_bounds); |
297 return new AshWindowTreeHostX11(init_params.initial_bounds); | 297 return new AshWindowTreeHostX11(init_params.initial_bounds); |
298 } | 298 } |
299 | 299 |
300 } // namespace ash | 300 } // namespace ash |
OLD | NEW |