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 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #if defined(USE_X11) | 9 #if defined(USE_X11) |
10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const display::Display& display) override { | 87 const display::Display& display) override { |
88 NOTREACHED(); | 88 NOTREACHED(); |
89 } | 89 } |
90 | 90 |
91 private: | 91 private: |
92 MirrorWindowController* controller_; // not owned. | 92 MirrorWindowController* controller_; // not owned. |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(MirroringScreenPositionClient); | 94 DISALLOW_COPY_AND_ASSIGN(MirroringScreenPositionClient); |
95 }; | 95 }; |
96 | 96 |
| 97 // A trivial CaptureClient that does nothing. That is, calls to set/release |
| 98 // capture are dropped. |
97 class NoneCaptureClient : public aura::client::CaptureClient { | 99 class NoneCaptureClient : public aura::client::CaptureClient { |
98 public: | 100 public: |
99 NoneCaptureClient() {} | 101 NoneCaptureClient() {} |
100 ~NoneCaptureClient() override {} | 102 ~NoneCaptureClient() override {} |
101 | 103 |
102 private: | 104 private: |
103 // Does a capture on the |window|. | 105 // aura::client::CaptureClient: |
104 void SetCapture(aura::Window* window) override {} | 106 void SetCapture(aura::Window* window) override {} |
105 | |
106 // Releases a capture from the |window|. | |
107 void ReleaseCapture(aura::Window* window) override {} | 107 void ReleaseCapture(aura::Window* window) override {} |
108 | 108 aura::Window* GetCaptureWindow() override { return nullptr; } |
109 // Returns the current capture window. | 109 aura::Window* GetGlobalCaptureWindow() override { return nullptr; } |
110 aura::Window* GetCaptureWindow() override { return NULL; } | 110 void AddObserver(aura::client::CaptureClientObserver* observer) override {} |
111 aura::Window* GetGlobalCaptureWindow() override { return NULL; } | 111 void RemoveObserver(aura::client::CaptureClientObserver* observer) override {} |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(NoneCaptureClient); | 113 DISALLOW_COPY_AND_ASSIGN(NoneCaptureClient); |
114 }; | 114 }; |
115 | 115 |
116 DisplayManager::MultiDisplayMode GetCurrentMultiDisplayMode() { | 116 DisplayManager::MultiDisplayMode GetCurrentMultiDisplayMode() { |
117 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 117 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
118 return display_manager->IsInUnifiedMode() | 118 return display_manager->IsInUnifiedMode() |
119 ? DisplayManager::UNIFIED | 119 ? DisplayManager::UNIFIED |
120 : (display_manager->IsInMirrorMode() ? DisplayManager::MIRRORING | 120 : (display_manager->IsInMirrorMode() ? DisplayManager::MIRRORING |
121 : DisplayManager::EXTENDED); | 121 : DisplayManager::EXTENDED); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 // EventProcessor may be accessed after this call if the mirroring window | 365 // EventProcessor may be accessed after this call if the mirroring window |
366 // was deleted as a result of input event (e.g. shortcut), so don't delete | 366 // was deleted as a result of input event (e.g. shortcut), so don't delete |
367 // now. | 367 // now. |
368 if (delay_host_deletion) | 368 if (delay_host_deletion) |
369 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, host_info); | 369 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, host_info); |
370 else | 370 else |
371 delete host_info; | 371 delete host_info; |
372 } | 372 } |
373 | 373 |
374 } // namespace ash | 374 } // namespace ash |
OLD | NEW |