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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame.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, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/themes/theme_service.h"
9 #include "chrome/browser/themes/theme_service_factory.h" 9 #include "chrome/browser/themes/theme_service_factory.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 30 matching lines...) Expand all
41 void BrowserFrame::InitBrowserFrame() { 41 void BrowserFrame::InitBrowserFrame() {
42 native_browser_frame_ = 42 native_browser_frame_ =
43 NativeBrowserFrame::CreateNativeBrowserFrame(this, browser_view_); 43 NativeBrowserFrame::CreateNativeBrowserFrame(this, browser_view_);
44 views::Widget::InitParams params; 44 views::Widget::InitParams params;
45 params.delegate = browser_view_; 45 params.delegate = browser_view_;
46 params.native_widget = native_browser_frame_->AsNativeWidget(); 46 params.native_widget = native_browser_frame_->AsNativeWidget();
47 if (browser_view_->browser()->is_type_tabbed()) { 47 if (browser_view_->browser()->is_type_tabbed()) {
48 // Typed panel/popup can only return a size once the widget has been 48 // Typed panel/popup can only return a size once the widget has been
49 // created. 49 // created.
50 params.bounds = browser_view_->browser()->GetSavedWindowBounds(); 50 params.bounds = browser_view_->browser()->GetSavedWindowBounds();
51 params.maximize = browser_view_->browser()->GetSavedWindowShowState() == 51 params.show_state = browser_view_->browser()->GetSavedWindowShowState();
52 ui::SHOW_STATE_MAXIMIZED;
53 } 52 }
54 Init(params); 53 Init(params);
55 #if defined(OS_CHROMEOS) 54 #if defined(OS_CHROMEOS)
56 // On ChromeOS we always want top-level windows to appear active. 55 // On ChromeOS we always want top-level windows to appear active.
57 if (!browser_view_->IsBrowserTypePopup()) 56 if (!browser_view_->IsBrowserTypePopup())
58 DisableInactiveRendering(); 57 DisableInactiveRendering();
59 #endif 58 #endif
60 } 59 }
61 60
62 int BrowserFrame::GetMinimizeButtonOffset() const { 61 int BrowserFrame::GetMinimizeButtonOffset() const {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // When running under remote desktop, if the remote desktop client is not 134 // When running under remote desktop, if the remote desktop client is not
136 // active on the users desktop, then none of the windows contained in the 135 // active on the users desktop, then none of the windows contained in the
137 // remote desktop will be activated. However, NativeWidgetWin::Activate() 136 // remote desktop will be activated. However, NativeWidgetWin::Activate()
138 // will still bring this browser window to the foreground. We explicitly 137 // will still bring this browser window to the foreground. We explicitly
139 // set ourselves as the last active browser window to ensure that we get 138 // set ourselves as the last active browser window to ensure that we get
140 // treated as such by the rest of Chrome. 139 // treated as such by the rest of Chrome.
141 BrowserList::SetLastActive(browser_view_->browser()); 140 BrowserList::SetLastActive(browser_view_->browser());
142 } 141 }
143 Widget::OnNativeWidgetActivationChanged(active); 142 Widget::OnNativeWidgetActivationChanged(active);
144 } 143 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698