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

Unified Diff: ash/wm/default_state.cc

Issue 169713003: Remove WindowState::IsNormalShowState() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: ash/wm/default_state.cc
diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc
index 5d3186fd1bce7bdd4d1a0008af98a3c6a4ba6b80..32d9c46abc73a55bcfacae431baaa66c3c935c93 100644
--- a/ash/wm/default_state.cc
+++ b/ash/wm/default_state.cc
@@ -150,8 +150,7 @@ bool DefaultState::ProcessCompoundEvents(WindowState* window_state,
window_state->ToggleFullscreen();
} else if (window_state->IsMaximized()) {
window_state->Restore();
- } else if (window_state->IsNormalShowType() ||
- window_state->IsSnapped()) {
+ } else if (window_state->IsNormalOrSnapped()) {
if (window_state->CanMaximize())
window_state->Maximize();
}
@@ -196,7 +195,7 @@ bool DefaultState::ProcessCompoundEvents(WindowState* window_state,
// - The window is snapped or has the normal show type.
if (window->delegate()->GetMaximumSize().width() != 0)
return true;
- if (!window_state->IsNormalShowType() && !window_state->IsSnapped())
+ if (!window_state->IsNormalOrSnapped())
return true;
gfx::Rect work_area =
ScreenUtil::GetDisplayWorkAreaBoundsInParent(window);
@@ -366,7 +365,7 @@ void DefaultState::UpdateBoundsFromShowType(WindowState* window_state,
// clicking the window border for example).
gfx::Rect restore;
if (old_show_type == SHOW_TYPE_MINIMIZED &&
- window_state->IsNormalShowState() &&
+ window_state->IsNormalOrSnapped() &&
window_state->HasRestoreBounds() &&
!window_state->unminimize_to_restore_bounds()) {
restore = window_state->GetRestoreBoundsInScreen();
@@ -452,7 +451,7 @@ void DefaultState::UpdateBoundsFromShowType(WindowState* window_state,
}
}
- if (window_state->IsNormalShowState())
+ if (window_state->IsNormalOrSnapped())
window_state->ClearRestoreBounds();
// Set the restore rectangle to the previously set restore rectangle.
« no previous file with comments | « ash/wm/caption_buttons/frame_maximize_button_unittest.cc ('k') | ash/wm/dock/docked_window_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698