OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ash/display/mirror_window_controller.h" | 5 #include "ash/display/mirror_window_controller.h" |
6 | 6 |
7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Xlib.h defines RootWindow. | 10 // Xlib.h defines RootWindow. |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ui/base/cursor/cursors_aura.h" | 27 #include "ui/base/cursor/cursors_aura.h" |
28 #include "ui/base/hit_test.h" | 28 #include "ui/base/hit_test.h" |
29 #include "ui/base/layout.h" | 29 #include "ui/base/layout.h" |
30 #include "ui/base/resource/resource_bundle.h" | 30 #include "ui/base/resource/resource_bundle.h" |
31 #include "ui/compositor/reflector.h" | 31 #include "ui/compositor/reflector.h" |
32 #include "ui/gfx/canvas.h" | 32 #include "ui/gfx/canvas.h" |
33 #include "ui/gfx/image/image_skia.h" | 33 #include "ui/gfx/image/image_skia.h" |
34 #include "ui/gfx/image/image_skia_operations.h" | 34 #include "ui/gfx/image/image_skia_operations.h" |
35 #include "ui/gfx/native_widget_types.h" | 35 #include "ui/gfx/native_widget_types.h" |
36 | 36 |
37 #if defined(USE_X11) | |
38 #include "ui/base/x/x11_util.h" | |
39 #endif | |
40 | |
41 namespace ash { | 37 namespace ash { |
42 namespace internal { | 38 namespace internal { |
43 namespace { | 39 namespace { |
44 | 40 |
45 #if defined(USE_X11) | 41 #if defined(USE_X11) |
46 // Mirror window shouldn't handle input events. | 42 // Mirror window shouldn't handle input events. |
47 void DisableInput(XID window) { | 43 void DisableInput(XID window) { |
48 long event_mask = ExposureMask | VisibilityChangeMask | | 44 long event_mask = ExposureMask | VisibilityChangeMask | |
49 StructureNotifyMask | PropertyChangeMask; | 45 StructureNotifyMask | PropertyChangeMask; |
50 XSelectInput(ui::GetXDisplay(), window, event_mask); | 46 XSelectInput(base::MessagePumpX11::GetDefaultXDisplay(), |
| 47 window, event_mask); |
51 } | 48 } |
52 #endif | 49 #endif |
53 | 50 |
54 class NoneCaptureClient : public aura::client::CaptureClient { | 51 class NoneCaptureClient : public aura::client::CaptureClient { |
55 public: | 52 public: |
56 NoneCaptureClient() {} | 53 NoneCaptureClient() {} |
57 virtual ~NoneCaptureClient() {} | 54 virtual ~NoneCaptureClient() {} |
58 | 55 |
59 private: | 56 private: |
60 // Does a capture on the |window|. | 57 // Does a capture on the |window|. |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 Shell::GetScreen()->GetPrimaryDisplay().id()); | 333 Shell::GetScreen()->GetPrimaryDisplay().id()); |
337 DCHECK(display_manager->mirrored_display().is_valid()); | 334 DCHECK(display_manager->mirrored_display().is_valid()); |
338 return scoped_ptr<aura::RootWindowTransformer>( | 335 return scoped_ptr<aura::RootWindowTransformer>( |
339 internal::CreateRootWindowTransformerForMirroredDisplay( | 336 internal::CreateRootWindowTransformerForMirroredDisplay( |
340 source_display_info, | 337 source_display_info, |
341 mirror_display_info)); | 338 mirror_display_info)); |
342 } | 339 } |
343 | 340 |
344 } // namespace internal | 341 } // namespace internal |
345 } // namespace ash | 342 } // namespace ash |
OLD | NEW |