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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 7621061: Restoring a session should restore window minimization state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows compile. Created 9 years, 4 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: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 59906b5e50712dd6d2da908effaad62488f99471..bd6b72c27ccd4f2e8231ecb5a4fa63e2c7e98fb6 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -783,6 +783,12 @@ bool BrowserView::IsMaximized() const {
return frame_->IsMaximized();
}
+bool BrowserView::IsMinimized() const {
+ // TODO(dhollowa): Add support for session restore of minimized state.
+ // http://crbug.com/43274
+ return false;
sky 2011/08/19 16:59:54 You should be able to call into frame_->IsMinimize
dhollowa 2011/08/19 17:58:53 Yes, I'd like to wait until I have both save/resto
+}
+
void BrowserView::SetFullscreen(bool fullscreen) {
if (IsFullscreen() == fullscreen)
return; // Nothing to do.
@@ -1628,7 +1634,9 @@ void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds,
// which we want to ignore.
if (!IsFullscreen() && browser_->ShouldSaveWindowPlacement()) {
WidgetDelegate::SaveWindowPlacement(bounds, maximized);
- browser_->SaveWindowPlacement(bounds, maximized);
+ browser_->SaveWindowPlacement(bounds,
sky 2011/08/19 16:59:54 Can you add a TODO to update this as well.
dhollowa 2011/08/19 17:58:53 Done.
+ maximized ? ui::SHOW_STATE_MAXIMIZED :
+ ui::SHOW_STATE_NORMAL);
}
}
@@ -1672,7 +1680,7 @@ bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
}
bool BrowserView::GetSavedMaximizedState(bool* maximized) const {
- *maximized = browser_->GetSavedMaximizedState();
+ *maximized = browser_->GetSavedWindowShowState() == ui::SHOW_STATE_MAXIMIZED;
sky 2011/08/19 16:59:54 And a TODO here too.
dhollowa 2011/08/19 17:58:53 Done.
return true;
}

Powered by Google App Engine
This is Rietveld 408576698