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

Unified Diff: ash/wm/default_state.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/common/wm_window_observer.h ('k') | ash/wm/dock/docked_window_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_state.cc
diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc
index 902db7ec69e0344f48da85d962e422029e480c30..5d82b8033663484dfe7bd6aab40b62a87780f2b3 100644
--- a/ash/wm/default_state.cc
+++ b/ash/wm/default_state.cc
@@ -68,17 +68,7 @@ void MoveToDisplayForRestore(WindowState* window_state) {
}
DockedWindowLayoutManager* GetDockedWindowLayoutManager(WmGlobals* globals) {
- WmWindow* active_window = globals->GetActiveWindow();
- if (!active_window)
- return nullptr;
-
- WmWindow* dock_container =
- active_window->GetRootWindow()->GetChildByShellWindowId(
- kShellWindowId_DockedContainer);
- DockedWindowLayoutManager* dock_layout =
- static_cast<DockedWindowLayoutManager*>(
- WmWindowAura::GetAuraWindow(dock_container)->layout_manager());
- return dock_layout;
+ return DockedWindowLayoutManager::Get(globals->GetActiveWindow());
}
class ScopedPreferredAlignmentResetter {
@@ -143,7 +133,7 @@ void CycleSnapDock(WindowState* window_state, WMEventType event) {
}
if (dock_layout &&
- dock_layout->CanDockWindow(window_state->aura_window(),
+ dock_layout->CanDockWindow(window_state->window(),
desired_dock_alignment)) {
if (window_state->IsDocked()) {
dock_layout->MaybeSetDesiredDockedAlignment(desired_dock_alignment);
« no previous file with comments | « ash/wm/common/wm_window_observer.h ('k') | ash/wm/dock/docked_window_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698