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

Side by Side Diff: views/desktop/desktop_window_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: 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 "views/desktop/desktop_window_view.h" 5 #include "views/desktop/desktop_window_view.h"
6 6
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 #include "ui/gfx/transform.h" 8 #include "ui/gfx/transform.h"
9 #include "views/desktop/desktop_background.h" 9 #include "views/desktop/desktop_background.h"
10 #include "views/desktop/desktop_window_root_view.h" 10 #include "views/desktop/desktop_window_root_view.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 params.delegate = desktop_window_view; 138 params.delegate = desktop_window_view;
139 // In this environment, CreateChromeWindow will default to creating a views- 139 // In this environment, CreateChromeWindow will default to creating a views-
140 // window, so we need to construct a NativeWidgetWin by hand. 140 // window, so we need to construct a NativeWidgetWin by hand.
141 // TODO(beng): Replace this with NativeWindow::CreateNativeRootWindow(). 141 // TODO(beng): Replace this with NativeWindow::CreateNativeRootWindow().
142 #if defined(USE_AURA) 142 #if defined(USE_AURA)
143 params.native_widget = new views::NativeWidgetAura(window); 143 params.native_widget = new views::NativeWidgetAura(window);
144 #elif defined(OS_WIN) 144 #elif defined(OS_WIN)
145 params.native_widget = new views::NativeWidgetWin(window); 145 params.native_widget = new views::NativeWidgetWin(window);
146 #elif defined(TOOLKIT_USES_GTK) 146 #elif defined(TOOLKIT_USES_GTK)
147 params.native_widget = new views::NativeWidgetGtk(window); 147 params.native_widget = new views::NativeWidgetGtk(window);
148 params.maximize = true; 148 params.show_state = ui::SHOW_STATE_MAXIMIZED;
149 #endif 149 #endif
150 params.bounds = gfx::Rect(20, 20, 1920, 1200); 150 params.bounds = gfx::Rect(20, 20, 1920, 1200);
151 window->Init(params); 151 window->Init(params);
152 window->Show(); 152 window->Show();
153 } 153 }
154 154
155 void DesktopWindowView::ActivateWidget(Widget* widget) { 155 void DesktopWindowView::ActivateWidget(Widget* widget) {
156 if (widget && widget->IsActive()) 156 if (widget && widget->IsActive())
157 return; 157 return;
158 158
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 active_native_widget_->GetWidget()->Deactivate(); 276 active_native_widget_->GetWidget()->Deactivate();
277 active_native_widget_ = 277 active_native_widget_ =
278 static_cast<NativeWidgetViews*>(widget->native_widget()); 278 static_cast<NativeWidgetViews*>(widget->native_widget());
279 } else if (widget == active_native_widget_->GetWidget()) { 279 } else if (widget == active_native_widget_->GetWidget()) {
280 active_native_widget_ = NULL; 280 active_native_widget_ = NULL;
281 } 281 }
282 } 282 }
283 283
284 } // namespace desktop 284 } // namespace desktop
285 } // namespace views 285 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698