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

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

Issue 7790010: Revert 98679 - Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- chrome/browser/ui/views/frame/browser_view.cc (revision 98696)
+++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
@@ -790,7 +790,9 @@
}
bool BrowserView::IsMinimized() const {
- return frame_->IsMinimized();
+ // TODO(dhollowa): Add support for session restore of minimized state.
+ // http://crbug.com/43274
+ return false;
}
void BrowserView::SetFullscreen(bool fullscreen) {
@@ -1632,22 +1634,23 @@
}
void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds,
- ui::WindowShowState show_state) {
+ 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, show_state);
- browser_->SaveWindowPlacement(bounds, show_state);
+ WidgetDelegate::SaveWindowPlacement(bounds, maximized);
+ browser_->SaveWindowPlacement(bounds,
+ maximized ? ui::SHOW_STATE_MAXIMIZED :
+ ui::SHOW_STATE_NORMAL);
}
}
-bool BrowserView::GetSavedWindowPlacement(
- gfx::Rect* bounds,
- ui::WindowShowState* show_state) const {
+bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
*bounds = browser_->GetSavedWindowBounds();
- *show_state = browser_->GetSavedWindowShowState();
-
if (browser_->is_type_popup() || browser_->is_type_panel()) {
// We are a popup window. The value passed in |bounds| represents two
// pieces of information:
@@ -1685,6 +1688,13 @@
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