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

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

Issue 7748036: Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/browser/ui/views/menu_model_adapter_test.cc » ('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 d2460053deee6ef4c00ed03a0befaac0ab5fdc96..4020129601c97004fc510173a2ed2527952047e1 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -790,9 +790,7 @@ bool BrowserView::IsMaximized() const {
}
bool BrowserView::IsMinimized() const {
- // TODO(dhollowa): Add support for session restore of minimized state.
- // http://crbug.com/43274
- return false;
+ return frame_->IsMinimized();
}
void BrowserView::SetFullscreen(bool fullscreen) {
@@ -1634,23 +1632,22 @@ 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
-
+ ui::WindowShowState show_state) {
// 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 ? ui::SHOW_STATE_MAXIMIZED :
- ui::SHOW_STATE_NORMAL);
+ WidgetDelegate::SaveWindowPlacement(bounds, show_state);
+ browser_->SaveWindowPlacement(bounds, show_state);
}
}
-bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
+bool BrowserView::GetSavedWindowPlacement(
+ gfx::Rect* bounds,
+ ui::WindowShowState* show_state) const {
*bounds = browser_->GetSavedWindowBounds();
+ *show_state = browser_->GetSavedWindowShowState();
+
if ((browser_->is_type_popup() || browser_->is_type_panel())
&& !browser_->is_devtools()) {
// We are a popup window. The value passed in |bounds| represents two
@@ -1689,13 +1686,6 @@ bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
return true;
}
-bool BrowserView::GetSavedMaximizedState(bool* maximized) const {
- // TODO(dhollowa): Add support for session restore of minimized state.
- // http://crbug.com/43274
- *maximized = browser_->GetSavedWindowShowState() == ui::SHOW_STATE_MAXIMIZED;
- return true;
-}
-
views::View* BrowserView::GetContentsView() {
return contents_container_;
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/menu_model_adapter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698