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

Unified Diff: ash/wm/workspace/workspace_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/window_resizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 8e6945baf14a0d2c704d416c8111af49aaea1f06..d2a51d2e0e5f7feec963ee1ebb73ba4975805571 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -537,10 +537,7 @@ WorkspaceWindowResizer::WorkspaceWindowResizer(
did_lock_cursor_ = true;
}
- aura::Window* dock_container = Shell::GetContainer(
- GetAuraTarget()->GetRootWindow(), kShellWindowId_DockedContainer);
- dock_layout_ = static_cast<DockedWindowLayoutManager*>(
- dock_container->layout_manager());
+ dock_layout_ = DockedWindowLayoutManager::Get(GetTarget());
// Only support attaching to the right/bottom.
DCHECK(attached_windows_.empty() ||
@@ -926,9 +923,8 @@ void WorkspaceWindowResizer::UpdateSnapPhantomWindow(const gfx::Point& location,
DockedAlignment desired_alignment = (snap_type_ == SNAP_LEFT) ?
DOCKED_ALIGNMENT_LEFT : DOCKED_ALIGNMENT_RIGHT;
const bool can_dock =
- dock_layout_->CanDockWindow(GetAuraTarget(), desired_alignment) &&
- dock_layout_->GetAlignmentOfWindow(GetAuraTarget()) !=
- DOCKED_ALIGNMENT_NONE;
+ dock_layout_->CanDockWindow(GetTarget(), desired_alignment) &&
+ dock_layout_->GetAlignmentOfWindow(GetTarget()) != DOCKED_ALIGNMENT_NONE;
if (!can_dock) {
// If the window cannot be docked, undock the window. This may change the
// workspace bounds and hence |snap_type_|.
@@ -1041,7 +1037,7 @@ void WorkspaceWindowResizer::SetDraggedWindowDocked(bool should_dock) {
if (should_dock) {
if (!dock_layout_->is_dragged_window_docked()) {
window_state()->set_bounds_changed_by_user(false);
- dock_layout_->DockDraggedWindow(GetAuraTarget());
+ dock_layout_->DockDraggedWindow(GetTarget());
}
} else {
if (dock_layout_->is_dragged_window_docked()) {
« no previous file with comments | « ash/wm/window_resizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698