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" |
11 #include "ash/mus/bridge/wm_shell_mus.h" | 11 #include "ash/mus/bridge/wm_shell_mus.h" |
12 #include "ash/mus/bridge/wm_window_mus.h" | 12 #include "ash/mus/bridge/wm_window_mus.h" |
13 #include "ash/mus/container_ids.h" | 13 #include "ash/mus/container_ids.h" |
14 #include "ash/mus/root_window_controller.h" | 14 #include "ash/mus/root_window_controller.h" |
| 15 #include "ash/mus/window_manager.h" |
15 #include "services/ui/public/cpp/window.h" | 16 #include "services/ui/public/cpp/window.h" |
16 #include "services/ui/public/cpp/window_property.h" | 17 #include "services/ui/public/cpp/window_property.h" |
17 #include "services/ui/public/cpp/window_tree_client.h" | 18 #include "services/ui/public/cpp/window_tree_client.h" |
18 #include "ui/display/display.h" | 19 #include "ui/display/display.h" |
19 #include "ui/views/mus/native_widget_mus.h" | 20 #include "ui/views/mus/native_widget_mus.h" |
20 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
21 | 22 |
22 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WmRootWindowControllerMus*); | 23 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WmRootWindowControllerMus*); |
23 | 24 |
24 namespace { | 25 namespace { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 widget, root_window_controller_->GetConnector(), new_window, | 129 widget, root_window_controller_->GetConnector(), new_window, |
129 ::ui::mojom::SurfaceType::DEFAULT); | 130 ::ui::mojom::SurfaceType::DEFAULT); |
130 } | 131 } |
131 | 132 |
132 WmWindow* WmRootWindowControllerMus::FindEventTarget( | 133 WmWindow* WmRootWindowControllerMus::FindEventTarget( |
133 const gfx::Point& location_in_screen) { | 134 const gfx::Point& location_in_screen) { |
134 NOTIMPLEMENTED(); | 135 NOTIMPLEMENTED(); |
135 return nullptr; | 136 return nullptr; |
136 } | 137 } |
137 | 138 |
| 139 gfx::Point WmRootWindowControllerMus::GetLastMouseLocationInRoot() { |
| 140 gfx::Point location = root_window_controller_->window_manager() |
| 141 ->window_tree_client() |
| 142 ->GetCursorScreenPoint(); |
| 143 location -= |
| 144 root_window_controller_->display().bounds().origin().OffsetFromOrigin(); |
| 145 return location; |
| 146 } |
| 147 |
138 void WmRootWindowControllerMus::AddObserver( | 148 void WmRootWindowControllerMus::AddObserver( |
139 WmRootWindowControllerObserver* observer) { | 149 WmRootWindowControllerObserver* observer) { |
140 observers_.AddObserver(observer); | 150 observers_.AddObserver(observer); |
141 } | 151 } |
142 | 152 |
143 void WmRootWindowControllerMus::RemoveObserver( | 153 void WmRootWindowControllerMus::RemoveObserver( |
144 WmRootWindowControllerObserver* observer) { | 154 WmRootWindowControllerObserver* observer) { |
145 observers_.RemoveObserver(observer); | 155 observers_.RemoveObserver(observer); |
146 } | 156 } |
147 | 157 |
148 } // namespace mus | 158 } // namespace mus |
149 } // namespace ash | 159 } // namespace ash |
OLD | NEW |