Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: ash/common/wm_window.cc

Issue 2660873002: Move two utility functions from ash/screen_util.h to ui/wm/core/coordinate_conversion.h (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_property.h" 14 #include "ash/common/wm_window_property.h"
15 #include "ash/public/cpp/shell_window_ids.h" 15 #include "ash/public/cpp/shell_window_ids.h"
16 #include "ash/public/cpp/window_properties.h" 16 #include "ash/public/cpp/window_properties.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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return result; 236 return result;
238 } 237 }
239 238
240 gfx::Point WmWindow::ConvertPointFromScreen(const gfx::Point& point) const { 239 gfx::Point WmWindow::ConvertPointFromScreen(const gfx::Point& point) const {
241 gfx::Point result(point); 240 gfx::Point result(point);
242 ::wm::ConvertPointFromScreen(window_, &result); 241 ::wm::ConvertPointFromScreen(window_, &result);
243 return result; 242 return result;
244 } 243 }
245 244
246 gfx::Rect WmWindow::ConvertRectToScreen(const gfx::Rect& rect) const { 245 gfx::Rect WmWindow::ConvertRectToScreen(const gfx::Rect& rect) const {
247 return ScreenUtil::ConvertRectToScreen(window_, rect); 246 gfx::Rect result(rect);
247 ::wm::ConvertRectToScreen(window_, &result);
248 return result;
248 } 249 }
249 250
250 gfx::Rect WmWindow::ConvertRectFromScreen(const gfx::Rect& rect) const { 251 gfx::Rect WmWindow::ConvertRectFromScreen(const gfx::Rect& rect) const {
251 return ScreenUtil::ConvertRectFromScreen(window_, rect); 252 gfx::Rect result(rect);
253 ::wm::ConvertRectFromScreen(window_, &result);
254 return result;
252 } 255 }
253 256
254 gfx::Size WmWindow::GetMinimumSize() const { 257 gfx::Size WmWindow::GetMinimumSize() const {
255 return window_->delegate() && !use_empty_minimum_size_for_testing_ 258 return window_->delegate() && !use_empty_minimum_size_for_testing_
256 ? window_->delegate()->GetMinimumSize() 259 ? window_->delegate()->GetMinimumSize()
257 : gfx::Size(); 260 : gfx::Size();
258 } 261 }
259 262
260 gfx::Size WmWindow::GetMaximumSize() const { 263 gfx::Size WmWindow::GetMaximumSize() const {
261 return window_->delegate() ? window_->delegate()->GetMaximumSize() 264 return window_->delegate() ? window_->delegate()->GetMaximumSize()
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 observer.OnTransientChildAdded(this, Get(transient)); 917 observer.OnTransientChildAdded(this, Get(transient));
915 } 918 }
916 919
917 void WmWindow::OnTransientChildRemoved(aura::Window* window, 920 void WmWindow::OnTransientChildRemoved(aura::Window* window,
918 aura::Window* transient) { 921 aura::Window* transient) {
919 for (auto& observer : transient_observers_) 922 for (auto& observer : transient_observers_)
920 observer.OnTransientChildRemoved(this, Get(transient)); 923 observer.OnTransientChildRemoved(this, Get(transient));
921 } 924 }
922 925
923 } // namespace ash 926 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698