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

Unified Diff: ash/wm/window_state.cc

Issue 597683003: Add window states docked; and docked minimized. Add wm window event to set docked and undocked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dock
Patch Set: Pull forward a change from the dependant CL to this Created 6 years, 2 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/maximize_mode/maximize_mode_window_state.cc ('k') | ash/wm/wm_event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.cc
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc
index e95dc4060222015b22b6c1f0da4b5486fd5b6e00..227f481a752339432b0b20fa000941d46d2ffdbe 100644
--- a/ash/wm/window_state.cc
+++ b/ash/wm/window_state.cc
@@ -101,7 +101,8 @@ WindowStateType WindowState::GetStateType() const {
}
bool WindowState::IsMinimized() const {
- return GetStateType() == WINDOW_STATE_TYPE_MINIMIZED;
+ return GetStateType() == WINDOW_STATE_TYPE_MINIMIZED ||
+ GetStateType() == WINDOW_STATE_TYPE_DOCKED_MINIMIZED;
}
bool WindowState::IsMaximized() const {
@@ -136,8 +137,8 @@ bool WindowState::IsActive() const {
}
bool WindowState::IsDocked() const {
- return window_->parent() &&
- window_->parent()->id() == kShellWindowId_DockedContainer;
+ return GetStateType() == WINDOW_STATE_TYPE_DOCKED ||
+ GetStateType() == WINDOW_STATE_TYPE_DOCKED_MINIMIZED;
}
bool WindowState::CanMaximize() const {
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_state.cc ('k') | ash/wm/wm_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698