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

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

Issue 10388251: Support maximize window command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Since the python bindings are to a newer version now, update chromedriver_tests.py accordingly." Created 8 years, 6 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 <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 } else { 1608 } else {
1609 fullscreen_exit_bubble_type_ = 1609 fullscreen_exit_bubble_type_ =
1610 FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION; 1610 FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION;
1611 gtk_widget_show(titlebar_widget()); 1611 gtk_widget_show(titlebar_widget());
1612 fullscreen_exit_bubble_.reset(); 1612 fullscreen_exit_bubble_.reset();
1613 UpdateCustomFrame(); 1613 UpdateCustomFrame();
1614 ShowSupportedWindowFeatures(); 1614 ShowSupportedWindowFeatures();
1615 } 1615 }
1616 } 1616 }
1617 1617
1618 if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
1619 content::NotificationService::current()->Notify(
1620 chrome::NOTIFICATION_BROWSER_WINDOW_MAXIMIZED,
1621 content::Source<BrowserWindow>(this),
1622 content::NotificationService::NoDetails());
1623 }
1624
1618 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); 1625 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen());
1619 UpdateWindowShape(bounds_.width(), bounds_.height()); 1626 UpdateWindowShape(bounds_.width(), bounds_.height());
1620 SaveWindowPosition(); 1627 SaveWindowPosition();
1621 return FALSE; 1628 return FALSE;
1622 } 1629 }
1623 1630
1624 // Callback for the delete event. This event is fired when the user tries to 1631 // Callback for the delete event. This event is fired when the user tries to
1625 // close the window (e.g., clicking on the X in the window manager title bar). 1632 // close the window (e.g., clicking on the X in the window manager title bar).
1626 gboolean BrowserWindowGtk::OnMainWindowDeleteEvent(GtkWidget* widget, 1633 gboolean BrowserWindowGtk::OnMainWindowDeleteEvent(GtkWidget* widget,
1627 GdkEvent* event) { 1634 GdkEvent* event) {
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 wm_type == ui::WM_OPENBOX || 2608 wm_type == ui::WM_OPENBOX ||
2602 wm_type == ui::WM_XFWM4); 2609 wm_type == ui::WM_XFWM4);
2603 } 2610 }
2604 2611
2605 // static 2612 // static
2606 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2613 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2607 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2614 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2608 browser_window_gtk->Init(); 2615 browser_window_gtk->Init();
2609 return browser_window_gtk; 2616 return browser_window_gtk;
2610 } 2617 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698