| 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 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 evmask.deviceid = XIAllDevices; | 51 evmask.deviceid = XIAllDevices; |
| 52 evmask.mask_len = sizeof(mask); | 52 evmask.mask_len = sizeof(mask); |
| 53 evmask.mask = mask; | 53 evmask.mask = mask; |
| 54 XISelectEvents(gfx::GetXDisplay(), window, &evmask, 1); | 54 XISelectEvents(gfx::GetXDisplay(), window, &evmask, 1); |
| 55 } | 55 } |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 class NoneCaptureClient : public aura::client::CaptureClient { | 58 class NoneCaptureClient : public aura::client::CaptureClient { |
| 59 public: | 59 public: |
| 60 NoneCaptureClient() {} | 60 NoneCaptureClient() {} |
| 61 virtual ~NoneCaptureClient() {} | 61 ~NoneCaptureClient() override {} |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Does a capture on the |window|. | 64 // Does a capture on the |window|. |
| 65 virtual void SetCapture(aura::Window* window) override {} | 65 void SetCapture(aura::Window* window) override {} |
| 66 | 66 |
| 67 // Releases a capture from the |window|. | 67 // Releases a capture from the |window|. |
| 68 virtual void ReleaseCapture(aura::Window* window) override {} | 68 void ReleaseCapture(aura::Window* window) override {} |
| 69 | 69 |
| 70 // Returns the current capture window. | 70 // Returns the current capture window. |
| 71 virtual aura::Window* GetCaptureWindow() override { | 71 aura::Window* GetCaptureWindow() override { return NULL; } |
| 72 return NULL; | 72 aura::Window* GetGlobalCaptureWindow() override { return NULL; } |
| 73 } | |
| 74 virtual aura::Window* GetGlobalCaptureWindow() override { | |
| 75 return NULL; | |
| 76 } | |
| 77 | 73 |
| 78 DISALLOW_COPY_AND_ASSIGN(NoneCaptureClient); | 74 DISALLOW_COPY_AND_ASSIGN(NoneCaptureClient); |
| 79 }; | 75 }; |
| 80 | 76 |
| 81 } // namespace | 77 } // namespace |
| 82 | 78 |
| 83 MirrorWindowController::MirrorWindowController() {} | 79 MirrorWindowController::MirrorWindowController() {} |
| 84 | 80 |
| 85 MirrorWindowController::~MirrorWindowController() { | 81 MirrorWindowController::~MirrorWindowController() { |
| 86 // Make sure the root window gets deleted before cursor_window_delegate. | 82 // Make sure the root window gets deleted before cursor_window_delegate. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 display_manager->mirrored_display_id()); | 178 display_manager->mirrored_display_id()); |
| 183 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( | 179 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( |
| 184 Shell::GetScreen()->GetPrimaryDisplay().id()); | 180 Shell::GetScreen()->GetPrimaryDisplay().id()); |
| 185 DCHECK(display_manager->IsMirrored()); | 181 DCHECK(display_manager->IsMirrored()); |
| 186 return scoped_ptr<RootWindowTransformer>( | 182 return scoped_ptr<RootWindowTransformer>( |
| 187 CreateRootWindowTransformerForMirroredDisplay(source_display_info, | 183 CreateRootWindowTransformerForMirroredDisplay(source_display_info, |
| 188 mirror_display_info)); | 184 mirror_display_info)); |
| 189 } | 185 } |
| 190 | 186 |
| 191 } // namespace ash | 187 } // namespace ash |
| OLD | NEW |