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

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gtk/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 1987
1988 void BrowserWindowGtk::SaveWindowPosition() { 1988 void BrowserWindowGtk::SaveWindowPosition() {
1989 // Browser::SaveWindowPlacement is used for session restore. 1989 // Browser::SaveWindowPlacement is used for session restore.
1990 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; 1990 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL;
1991 if (IsMaximized()) 1991 if (IsMaximized())
1992 show_state = ui::SHOW_STATE_MAXIMIZED; 1992 show_state = ui::SHOW_STATE_MAXIMIZED;
1993 else if (IsMinimized()) 1993 else if (IsMinimized())
1994 show_state = ui::SHOW_STATE_MINIMIZED; 1994 show_state = ui::SHOW_STATE_MINIMIZED;
1995 1995
1996 if (chrome::ShouldSaveWindowPlacement(browser_.get())) 1996 if (chrome::ShouldSaveWindowPlacement(browser_.get()))
1997 chrome::SaveWindowPlacement(browser_.get(), restored_bounds_, show_state); 1997 chrome::SaveWindowPlacement(browser_.get(),
1998 restored_bounds_,
1999 show_state,
2000 false);
1998 2001
1999 // We also need to save the placement for startup. 2002 // We also need to save the placement for startup.
2000 // This is a web of calls between views and delegates on Windows, but the 2003 // This is a web of calls between views and delegates on Windows, but the
2001 // crux of the logic follows. See also cocoa/browser_window_controller.mm. 2004 // crux of the logic follows. See also cocoa/browser_window_controller.mm.
2002 if (!browser_->profile()->GetPrefs()) 2005 if (!browser_->profile()->GetPrefs())
2003 return; 2006 return;
2004 2007
2005 std::string window_name = chrome::GetWindowPlacementKey(browser_.get()); 2008 std::string window_name = chrome::GetWindowPlacementKey(browser_.get());
2006 DictionaryPrefUpdate update(browser_->profile()->GetPrefs(), 2009 DictionaryPrefUpdate update(browser_->profile()->GetPrefs(),
2007 window_name.c_str()); 2010 window_name.c_str());
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2421 wm_type == ui::WM_OPENBOX || 2424 wm_type == ui::WM_OPENBOX ||
2422 wm_type == ui::WM_XFWM4); 2425 wm_type == ui::WM_XFWM4);
2423 } 2426 }
2424 2427
2425 // static 2428 // static
2426 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2429 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2427 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2430 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2428 browser_window_gtk->Init(); 2431 browser_window_gtk->Init();
2429 return browser_window_gtk; 2432 return browser_window_gtk;
2430 } 2433 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698