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

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

Issue 12803011: Add BaseWindow::GetContentBounds() and use in WindowController::CreateWindowValue() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix osx build Created 7 years, 9 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 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 gfx::Rect BrowserWindowGtk::GetBounds() const { 801 gfx::Rect BrowserWindowGtk::GetBounds() const {
802 // TODO(stevenjb): This should really include the bounds of the title also.
802 return bounds_; 803 return bounds_;
803 } 804 }
804 805
806 gfx::Rect BrowserWindowGtk::GetContentBounds() const {
807 return bounds_;
808 }
809
805 bool BrowserWindowGtk::IsMaximized() const { 810 bool BrowserWindowGtk::IsMaximized() const {
806 return (state_ & GDK_WINDOW_STATE_MAXIMIZED); 811 return (state_ & GDK_WINDOW_STATE_MAXIMIZED);
807 } 812 }
808 813
809 bool BrowserWindowGtk::IsMinimized() const { 814 bool BrowserWindowGtk::IsMinimized() const {
810 return (state_ & GDK_WINDOW_STATE_ICONIFIED); 815 return (state_ & GDK_WINDOW_STATE_ICONIFIED);
811 } 816 }
812 817
813 void BrowserWindowGtk::Maximize() { 818 void BrowserWindowGtk::Maximize() {
814 gtk_window_maximize(window_); 819 gtk_window_maximize(window_);
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 wm_type == ui::WM_OPENBOX || 2373 wm_type == ui::WM_OPENBOX ||
2369 wm_type == ui::WM_XFWM4); 2374 wm_type == ui::WM_XFWM4);
2370 } 2375 }
2371 2376
2372 // static 2377 // static
2373 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2378 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2374 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2379 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2375 browser_window_gtk->Init(); 2380 browser_window_gtk->Init();
2376 return browser_window_gtk; 2381 return browser_window_gtk;
2377 } 2382 }
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