OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" |
| 6 |
| 7 #include "services/ui/public/cpp/window_tree_client.h" |
| 8 #include "ui/views/mus/pointer_watcher_event_router.h" |
| 9 #include "ui/views/mus/window_manager_connection.h" |
| 10 |
| 11 ImmersiveContextMus::ImmersiveContextMus() {} |
| 12 |
| 13 ImmersiveContextMus::~ImmersiveContextMus() {} |
| 14 |
| 15 void ImmersiveContextMus::InstallResizeHandleWindowTargeter( |
| 16 ash::ImmersiveFullscreenController* controller) { |
| 17 // There shouldn't be a need to do anything here, the windowmanager takes care |
| 18 // of this for us. |
| 19 } |
| 20 |
| 21 void ImmersiveContextMus::OnEnteringOrExitingImmersive( |
| 22 ash::ImmersiveFullscreenController* controller, |
| 23 bool entering) { |
| 24 // TODO: see implementation in ImmersiveContextAsh, this needs to use mojo |
| 25 // to poke some state in mash (shelf model, in immersive, shelf |
| 26 // visibility...). |
| 27 // http://crbug.com/640371. |
| 28 NOTIMPLEMENTED(); |
| 29 } |
| 30 |
| 31 gfx::Rect ImmersiveContextMus::GetDisplayBoundsInScreen(views::Widget* widget) { |
| 32 return widget->GetWindowBoundsInScreen(); |
| 33 } |
| 34 |
| 35 void ImmersiveContextMus::AddPointerWatcher(views::PointerWatcher* watcher, |
| 36 bool wants_moves) { |
| 37 views::WindowManagerConnection::Get() |
| 38 ->pointer_watcher_event_router() |
| 39 ->AddPointerWatcher(watcher, wants_moves); |
| 40 } |
| 41 |
| 42 void ImmersiveContextMus::RemovePointerWatcher(views::PointerWatcher* watcher) { |
| 43 views::WindowManagerConnection::Get() |
| 44 ->pointer_watcher_event_router() |
| 45 ->RemovePointerWatcher(watcher); |
| 46 } |
| 47 |
| 48 bool ImmersiveContextMus::DoesAnyWindowHaveCapture() { |
| 49 return views::WindowManagerConnection::Get()->client()->GetCaptureWindow() != |
| 50 nullptr; |
| 51 } |
| 52 |
| 53 bool ImmersiveContextMus::IsMouseEventsEnabled() { |
| 54 // TODO: http://crbug.com/640374. |
| 55 NOTIMPLEMENTED(); |
| 56 return true; |
| 57 } |
OLD | NEW |