Chromium Code Reviews| 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 | |
| 37 namespace ash { | 41 namespace ash { |
| 38 namespace internal { | 42 namespace internal { |
| 39 namespace { | 43 namespace { |
| 40 | 44 |
| 41 #if defined(USE_X11) | 45 #if defined(USE_X11) |
| 42 // Mirror window shouldn't handle input events. | 46 // Mirror window shouldn't handle input events. |
| 43 void DisableInput(XID window) { | 47 void DisableInput(XID window) { |
| 44 long event_mask = ExposureMask | VisibilityChangeMask | | 48 long event_mask = ExposureMask | VisibilityChangeMask | |
| 45 StructureNotifyMask | PropertyChangeMask; | 49 StructureNotifyMask | PropertyChangeMask; |
| 46 XSelectInput(base::MessagePumpX11::GetDefaultXDisplay(), | 50 XSelectInput(ui::GetXDisplay(), |
| 47 window, event_mask); | 51 window, event_mask); |
|
oshima
2013/09/17 15:05:10
can you make this single line?
sadrul
2013/09/17 15:28:44
Done.
| |
| 48 } | 52 } |
| 49 #endif | 53 #endif |
| 50 | 54 |
| 51 class NoneCaptureClient : public aura::client::CaptureClient { | 55 class NoneCaptureClient : public aura::client::CaptureClient { |
| 52 public: | 56 public: |
| 53 NoneCaptureClient() {} | 57 NoneCaptureClient() {} |
| 54 virtual ~NoneCaptureClient() {} | 58 virtual ~NoneCaptureClient() {} |
| 55 | 59 |
| 56 private: | 60 private: |
| 57 // Does a capture on the |window|. | 61 // Does a capture on the |window|. |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 333 Shell::GetScreen()->GetPrimaryDisplay().id()); | 337 Shell::GetScreen()->GetPrimaryDisplay().id()); |
| 334 DCHECK(display_manager->mirrored_display().is_valid()); | 338 DCHECK(display_manager->mirrored_display().is_valid()); |
| 335 return scoped_ptr<aura::RootWindowTransformer>( | 339 return scoped_ptr<aura::RootWindowTransformer>( |
| 336 internal::CreateRootWindowTransformerForMirroredDisplay( | 340 internal::CreateRootWindowTransformerForMirroredDisplay( |
| 337 source_display_info, | 341 source_display_info, |
| 338 mirror_display_info)); | 342 mirror_display_info)); |
| 339 } | 343 } |
| 340 | 344 |
| 341 } // namespace internal | 345 } // namespace internal |
| 342 } // namespace ash | 346 } // namespace ash |
| OLD | NEW |