| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/ui/views/frame/immersive_context_mus.h" | 5 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" |
| 6 | 6 |
| 7 #include "ui/aura/client/capture_client.h" | |
| 8 #include "ui/views/mus/mus_client.h" | 7 #include "ui/views/mus/mus_client.h" |
| 9 #include "ui/views/mus/pointer_watcher_event_router.h" | 8 #include "ui/views/mus/pointer_watcher_event_router.h" |
| 10 #include "ui/views/pointer_watcher.h" | 9 #include "ui/views/pointer_watcher.h" |
| 10 #include "ui/views/widget/desktop_aura/desktop_capture_client.h" |
| 11 | 11 |
| 12 ImmersiveContextMus::ImmersiveContextMus( | 12 ImmersiveContextMus::ImmersiveContextMus() {} |
| 13 aura::client::CaptureClient* capture_client) | |
| 14 : capture_client_(capture_client) {} | |
| 15 | 13 |
| 16 ImmersiveContextMus::~ImmersiveContextMus() {} | 14 ImmersiveContextMus::~ImmersiveContextMus() {} |
| 17 | 15 |
| 18 void ImmersiveContextMus::InstallResizeHandleWindowTargeter( | 16 void ImmersiveContextMus::InstallResizeHandleWindowTargeter( |
| 19 ash::ImmersiveFullscreenController* controller) { | 17 ash::ImmersiveFullscreenController* controller) { |
| 20 // There shouldn't be a need to do anything here, the windowmanager takes care | 18 // There shouldn't be a need to do anything here, the windowmanager takes care |
| 21 // of this for us. | 19 // of this for us. |
| 22 } | 20 } |
| 23 | 21 |
| 24 void ImmersiveContextMus::OnEnteringOrExitingImmersive( | 22 void ImmersiveContextMus::OnEnteringOrExitingImmersive( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 views::MusClient::Get()->pointer_watcher_event_router()->AddPointerWatcher( | 40 views::MusClient::Get()->pointer_watcher_event_router()->AddPointerWatcher( |
| 43 watcher, events == views::PointerWatcherEventTypes::MOVES); | 41 watcher, events == views::PointerWatcherEventTypes::MOVES); |
| 44 } | 42 } |
| 45 | 43 |
| 46 void ImmersiveContextMus::RemovePointerWatcher(views::PointerWatcher* watcher) { | 44 void ImmersiveContextMus::RemovePointerWatcher(views::PointerWatcher* watcher) { |
| 47 views::MusClient::Get()->pointer_watcher_event_router()->RemovePointerWatcher( | 45 views::MusClient::Get()->pointer_watcher_event_router()->RemovePointerWatcher( |
| 48 watcher); | 46 watcher); |
| 49 } | 47 } |
| 50 | 48 |
| 51 bool ImmersiveContextMus::DoesAnyWindowHaveCapture() { | 49 bool ImmersiveContextMus::DoesAnyWindowHaveCapture() { |
| 52 return capture_client_->GetGlobalCaptureWindow() != nullptr; | 50 return views::DesktopCaptureClient::GetCaptureWindowGlobal() != nullptr; |
| 53 } | 51 } |
| 54 | 52 |
| 55 bool ImmersiveContextMus::IsMouseEventsEnabled() { | 53 bool ImmersiveContextMus::IsMouseEventsEnabled() { |
| 56 // TODO: http://crbug.com/640374. | 54 // TODO: http://crbug.com/640374. |
| 57 NOTIMPLEMENTED(); | 55 NOTIMPLEMENTED(); |
| 58 return true; | 56 return true; |
| 59 } | 57 } |
| OLD | NEW |