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/common/wm_window.h" | 5 #include "ash/common/wm_window.h" |
6 | 6 |
7 #include "ash/aura/aura_layout_manager_adapter.h" | 7 #include "ash/aura/aura_layout_manager_adapter.h" |
8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
9 #include "ash/common/ash_constants.h" | 9 #include "ash/common/ash_constants.h" |
10 #include "ash/common/shelf/shelf_item_types.h" | 10 #include "ash/common/shelf/shelf_item_types.h" |
11 #include "ash/common/wm/window_state.h" | 11 #include "ash/common/wm/window_state.h" |
12 #include "ash/common/wm_layout_manager.h" | 12 #include "ash/common/wm_layout_manager.h" |
13 #include "ash/common/wm_transient_window_observer.h" | 13 #include "ash/common/wm_transient_window_observer.h" |
14 #include "ash/common/wm_window_observer.h" | 14 #include "ash/common/wm_window_observer.h" |
15 #include "ash/common/wm_window_property.h" | 15 #include "ash/common/wm_window_property.h" |
16 #include "ash/public/cpp/shell_window_ids.h" | 16 #include "ash/public/cpp/shell_window_ids.h" |
17 #include "ash/root_window_controller.h" | 17 #include "ash/root_window_controller.h" |
18 #include "ash/screen_util.h" | |
19 #include "ash/shell.h" | 18 #include "ash/shell.h" |
20 #include "ash/wm/resize_handle_window_targeter.h" | 19 #include "ash/wm/resize_handle_window_targeter.h" |
21 #include "ash/wm/resize_shadow_controller.h" | 20 #include "ash/wm/resize_shadow_controller.h" |
22 #include "ash/wm/window_animations.h" | 21 #include "ash/wm/window_animations.h" |
23 #include "ash/wm/window_mirror_view.h" | 22 #include "ash/wm/window_mirror_view.h" |
24 #include "ash/wm/window_properties.h" | 23 #include "ash/wm/window_properties.h" |
25 #include "ash/wm/window_state_aura.h" | 24 #include "ash/wm/window_state_aura.h" |
26 #include "ash/wm/window_util.h" | 25 #include "ash/wm/window_util.h" |
27 #include "base/memory/ptr_util.h" | 26 #include "base/memory/ptr_util.h" |
28 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 27 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return result; | 235 return result; |
237 } | 236 } |
238 | 237 |
239 gfx::Point WmWindow::ConvertPointFromScreen(const gfx::Point& point) const { | 238 gfx::Point WmWindow::ConvertPointFromScreen(const gfx::Point& point) const { |
240 gfx::Point result(point); | 239 gfx::Point result(point); |
241 ::wm::ConvertPointFromScreen(window_, &result); | 240 ::wm::ConvertPointFromScreen(window_, &result); |
242 return result; | 241 return result; |
243 } | 242 } |
244 | 243 |
245 gfx::Rect WmWindow::ConvertRectToScreen(const gfx::Rect& rect) const { | 244 gfx::Rect WmWindow::ConvertRectToScreen(const gfx::Rect& rect) const { |
246 return ScreenUtil::ConvertRectToScreen(window_, rect); | 245 return ::wm::ConvertRectToScreen(window_, rect); |
247 } | 246 } |
248 | 247 |
249 gfx::Rect WmWindow::ConvertRectFromScreen(const gfx::Rect& rect) const { | 248 gfx::Rect WmWindow::ConvertRectFromScreen(const gfx::Rect& rect) const { |
250 return ScreenUtil::ConvertRectFromScreen(window_, rect); | 249 return ::wm::ConvertRectFromScreen(window_, rect); |
251 } | 250 } |
252 | 251 |
253 gfx::Size WmWindow::GetMinimumSize() const { | 252 gfx::Size WmWindow::GetMinimumSize() const { |
254 return window_->delegate() && !use_empty_minimum_size_for_testing_ | 253 return window_->delegate() && !use_empty_minimum_size_for_testing_ |
255 ? window_->delegate()->GetMinimumSize() | 254 ? window_->delegate()->GetMinimumSize() |
256 : gfx::Size(); | 255 : gfx::Size(); |
257 } | 256 } |
258 | 257 |
259 gfx::Size WmWindow::GetMaximumSize() const { | 258 gfx::Size WmWindow::GetMaximumSize() const { |
260 return window_->delegate() ? window_->delegate()->GetMaximumSize() | 259 return window_->delegate() ? window_->delegate()->GetMaximumSize() |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 observer.OnTransientChildAdded(this, Get(transient)); | 1008 observer.OnTransientChildAdded(this, Get(transient)); |
1010 } | 1009 } |
1011 | 1010 |
1012 void WmWindow::OnTransientChildRemoved(aura::Window* window, | 1011 void WmWindow::OnTransientChildRemoved(aura::Window* window, |
1013 aura::Window* transient) { | 1012 aura::Window* transient) { |
1014 for (auto& observer : transient_observers_) | 1013 for (auto& observer : transient_observers_) |
1015 observer.OnTransientChildRemoved(this, Get(transient)); | 1014 observer.OnTransientChildRemoved(this, Get(transient)); |
1016 } | 1015 } |
1017 | 1016 |
1018 } // namespace ash | 1017 } // namespace ash |
OLD | NEW |