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

Unified Diff: ash/wm/window_resizer.cc

Issue 1907863002: Converts DockedWindowLayoutManager to common ash/wm types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/dock/docked_window_resizer_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_resizer.cc
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index cad9947bd84706d40d7f3492d6dcc51a1891d17d..277a401f3375f37ee12191156a757d0ef73eb577 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -132,12 +132,8 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
// on the size.
if (details().bounds_change & kBoundsChange_Resizes) {
gfx::Rect work_area = GetTarget()->GetDisplayNearestWindow().work_area();
- wm::WmWindow* dock_container =
- GetTarget()->GetRootWindow()->GetChildByShellWindowId(
- kShellWindowId_DockedContainer);
DockedWindowLayoutManager* dock_layout =
- static_cast<DockedWindowLayoutManager*>(
- wm::WmWindowAura::GetAuraWindow(dock_container)->layout_manager());
+ DockedWindowLayoutManager::Get(GetTarget());
work_area.Union(dock_layout->docked_bounds());
work_area = GetTarget()->GetParent()->ConvertRectFromScreen(work_area);
@@ -203,12 +199,8 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
// calculate the target display after the drag.
const gfx::Display& display =
gfx::Screen::GetScreen()->GetDisplayMatching(near_passed_location);
- wm::WmWindow* dock_container =
- wm::GetRootWindowMatching(near_passed_location)
- ->GetChildByShellWindowId(kShellWindowId_DockedContainer);
- DockedWindowLayoutManager* dock_layout =
- static_cast<DockedWindowLayoutManager*>(
- wm::WmWindowAura::GetAuraWindow(dock_container)->layout_manager());
+ DockedWindowLayoutManager* dock_layout = DockedWindowLayoutManager::Get(
+ wm::GetRootWindowMatching(near_passed_location));
gfx::Rect screen_work_area = display.work_area();
screen_work_area.Union(dock_layout->docked_bounds());
« no previous file with comments | « ash/wm/dock/docked_window_resizer_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698