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

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

Issue 14031021: Save and restore State for ShellWindows, including panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 792
793 void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) { 793 void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) {
794 toolbar_->GetLocationBarView()->ZoomChangedForActiveTab( 794 toolbar_->GetLocationBarView()->ZoomChangedForActiveTab(
795 can_show_bubble && !toolbar_->IsWrenchMenuShowing()); 795 can_show_bubble && !toolbar_->IsWrenchMenuShowing());
796 } 796 }
797 797
798 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const { 798 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const {
799 return restored_bounds_; 799 return restored_bounds_;
800 } 800 }
801 801
802 ui::WindowShowState BrowserWindowGtk::GetRestoredState() const {
803 if (IsMaximized())
804 return ui::SHOW_STATE_MAXIMIZED;
805 if (IsMinimized())
806 return ui::SHOW_STATE_MINIMIZED;
807 return ui::SHOW_STATE_NORMAL;
808 }
809
802 gfx::Rect BrowserWindowGtk::GetBounds() const { 810 gfx::Rect BrowserWindowGtk::GetBounds() const {
803 return bounds_; 811 return bounds_;
804 } 812 }
805 813
806 bool BrowserWindowGtk::IsMaximized() const { 814 bool BrowserWindowGtk::IsMaximized() const {
807 return (state_ & GDK_WINDOW_STATE_MAXIMIZED); 815 return (state_ & GDK_WINDOW_STATE_MAXIMIZED);
808 } 816 }
809 817
810 bool BrowserWindowGtk::IsMinimized() const { 818 bool BrowserWindowGtk::IsMinimized() const {
811 return (state_ & GDK_WINDOW_STATE_ICONIFIED); 819 return (state_ & GDK_WINDOW_STATE_ICONIFIED);
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 wm_type == ui::WM_OPENBOX || 2403 wm_type == ui::WM_OPENBOX ||
2396 wm_type == ui::WM_XFWM4); 2404 wm_type == ui::WM_XFWM4);
2397 } 2405 }
2398 2406
2399 // static 2407 // static
2400 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2408 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2401 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2409 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2402 browser_window_gtk->Init(); 2410 browser_window_gtk->Init();
2403 return browser_window_gtk; 2411 return browser_window_gtk;
2404 } 2412 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.h ('k') | chrome/browser/ui/gtk/extensions/native_app_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698