| 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 "ash/mus/bridge/wm_root_window_controller_mus.h" | 5 #include "ash/mus/bridge/wm_root_window_controller_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 7 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
| 8 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" | 8 #include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h" |
| 9 #include "ash/common/wm_root_window_controller_observer.h" | 9 #include "ash/common/wm_root_window_controller_observer.h" |
| 10 #include "ash/mus/bridge/wm_shelf_mus.h" | 10 #include "ash/mus/bridge/wm_shelf_mus.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // static | 49 // static |
| 50 const WmRootWindowControllerMus* WmRootWindowControllerMus::Get( | 50 const WmRootWindowControllerMus* WmRootWindowControllerMus::Get( |
| 51 const ui::Window* window) { | 51 const ui::Window* window) { |
| 52 if (!window) | 52 if (!window) |
| 53 return nullptr; | 53 return nullptr; |
| 54 | 54 |
| 55 return window->GetRoot()->GetLocalProperty(kWmRootWindowControllerKey); | 55 return window->GetRoot()->GetLocalProperty(kWmRootWindowControllerKey); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void WmRootWindowControllerMus::NotifyFullscreenStateChange( | |
| 59 bool is_fullscreen) { | |
| 60 FOR_EACH_OBSERVER(WmRootWindowControllerObserver, observers_, | |
| 61 OnFullscreenStateChanged(is_fullscreen)); | |
| 62 } | |
| 63 | |
| 64 gfx::Point WmRootWindowControllerMus::ConvertPointToScreen( | 58 gfx::Point WmRootWindowControllerMus::ConvertPointToScreen( |
| 65 const WmWindowMus* source, | 59 const WmWindowMus* source, |
| 66 const gfx::Point& point) const { | 60 const gfx::Point& point) const { |
| 67 gfx::Point point_in_root = | 61 gfx::Point point_in_root = |
| 68 source->ConvertPointToTarget(source->GetRootWindow(), point); | 62 source->ConvertPointToTarget(source->GetRootWindow(), point); |
| 69 point_in_root += GetDisplay().bounds().OffsetFromOrigin(); | 63 point_in_root += GetDisplay().bounds().OffsetFromOrigin(); |
| 70 return point_in_root; | 64 return point_in_root; |
| 71 } | 65 } |
| 72 | 66 |
| 73 gfx::Point WmRootWindowControllerMus::ConvertPointFromScreen( | 67 gfx::Point WmRootWindowControllerMus::ConvertPointFromScreen( |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 observers_.AddObserver(observer); | 144 observers_.AddObserver(observer); |
| 151 } | 145 } |
| 152 | 146 |
| 153 void WmRootWindowControllerMus::RemoveObserver( | 147 void WmRootWindowControllerMus::RemoveObserver( |
| 154 WmRootWindowControllerObserver* observer) { | 148 WmRootWindowControllerObserver* observer) { |
| 155 observers_.RemoveObserver(observer); | 149 observers_.RemoveObserver(observer); |
| 156 } | 150 } |
| 157 | 151 |
| 158 } // namespace mus | 152 } // namespace mus |
| 159 } // namespace ash | 153 } // namespace ash |
| OLD | NEW |