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

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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 791
792 void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) { 792 void BrowserWindowGtk::ZoomChangedForActiveTab(bool can_show_bubble) {
793 toolbar_->GetLocationBarView()->ZoomChangedForActiveTab( 793 toolbar_->GetLocationBarView()->ZoomChangedForActiveTab(
794 can_show_bubble && !toolbar_->IsWrenchMenuShowing()); 794 can_show_bubble && !toolbar_->IsWrenchMenuShowing());
795 } 795 }
796 796
797 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const { 797 gfx::Rect BrowserWindowGtk::GetRestoredBounds() const {
798 return restored_bounds_; 798 return restored_bounds_;
799 } 799 }
800 800
801 ui::WindowShowState BrowserWindowGtk::GetRestoredState() const {
802 if (IsMaximized())
803 return ui::SHOW_STATE_MAXIMIZED;
804 if (IsMinimized())
805 return ui::SHOW_STATE_MINIMIZED;
806 return ui::SHOW_STATE_NORMAL;
807 }
808
801 gfx::Rect BrowserWindowGtk::GetBounds() const { 809 gfx::Rect BrowserWindowGtk::GetBounds() const {
802 return bounds_; 810 return bounds_;
803 } 811 }
804 812
805 bool BrowserWindowGtk::IsMaximized() const { 813 bool BrowserWindowGtk::IsMaximized() const {
806 return (state_ & GDK_WINDOW_STATE_MAXIMIZED); 814 return (state_ & GDK_WINDOW_STATE_MAXIMIZED);
807 } 815 }
808 816
809 bool BrowserWindowGtk::IsMinimized() const { 817 bool BrowserWindowGtk::IsMinimized() const {
810 return (state_ & GDK_WINDOW_STATE_ICONIFIED); 818 return (state_ & GDK_WINDOW_STATE_ICONIFIED);
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 wm_type == ui::WM_OPENBOX || 2404 wm_type == ui::WM_OPENBOX ||
2397 wm_type == ui::WM_XFWM4); 2405 wm_type == ui::WM_XFWM4);
2398 } 2406 }
2399 2407
2400 // static 2408 // static
2401 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2409 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2402 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2410 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2403 browser_window_gtk->Init(); 2411 browser_window_gtk->Init();
2404 return browser_window_gtk; 2412 return browser_window_gtk;
2405 } 2413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698