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

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: Addressing Mark's comments. 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e206a6dacef98707cbb5d09053b670f0205a0144 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;
+}
+
void BrowserView::SetFullscreen(bool fullscreen) {
if (IsFullscreen() == fullscreen)
return; // Nothing to do.
@@ -1623,12 +1629,17 @@ std::wstring BrowserView::GetWindowName() const {
void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds,
bool maximized) {
+ // TODO(dhollowa): Add support for session restore of minimized state.
+ // http://crbug.com/43274
+
// If IsFullscreen() is true, we've just changed into fullscreen mode, and
// we're catching the going-into-fullscreen sizing and positioning calls,
// which we want to ignore.
if (!IsFullscreen() && browser_->ShouldSaveWindowPlacement()) {
WidgetDelegate::SaveWindowPlacement(bounds, maximized);
- browser_->SaveWindowPlacement(bounds, maximized);
+ browser_->SaveWindowPlacement(bounds,
+ maximized ? ui::SHOW_STATE_MAXIMIZED :
+ ui::SHOW_STATE_NORMAL);
}
}
@@ -1672,7 +1683,9 @@ bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
}
bool BrowserView::GetSavedMaximizedState(bool* maximized) const {
- *maximized = browser_->GetSavedMaximizedState();
+ // TODO(dhollowa): Add support for session restore of minimized state.
+ // http://crbug.com/43274
+ *maximized = browser_->GetSavedWindowShowState() == ui::SHOW_STATE_MAXIMIZED;
return true;
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698