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

Unified Diff: ash/wm/dock/docked_window_resizer.cc

Issue 1056793006: [Docking] Persists docked state on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Docking] Makes docked state persistent on Chrome OS (comments) Created 5 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 | « no previous file | ash/wm/window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_resizer.cc
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc
index d0b86f9aed60fe4e2442806684c3b805e8e761b5..91486c6285387731e070b2223f01a246eaf24415 100644
--- a/ash/wm/dock/docked_window_resizer.cc
+++ b/ash/wm/dock/docked_window_resizer.cc
@@ -299,13 +299,15 @@ DockedAction DockedWindowResizer::MaybeReparentWindowOnDragCompletion(
action = was_docked_ ? DOCKED_ACTION_UNDOCK : DOCKED_ACTION_NONE;
}
} else {
- // Docked state was not changed but still need to record a UMA action.
+ // |action| is recorded in UMA and used to maintain |window_state_|.
if (is_resized && is_docked_ && was_docked_)
action = DOCKED_ACTION_RESIZE;
else if (is_docked_ && was_docked_)
action = DOCKED_ACTION_REORDER;
else if (is_docked_ && !was_docked_)
action = DOCKED_ACTION_DOCK;
+ else if (!is_docked_ && was_docked_)
+ action = DOCKED_ACTION_UNDOCK;
else
action = DOCKED_ACTION_NONE;
}
« no previous file with comments | « no previous file | ash/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698