Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1596 } else { | 1596 } else { |
| 1597 fullscreen_exit_bubble_type_ = | 1597 fullscreen_exit_bubble_type_ = |
| 1598 FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION; | 1598 FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION; |
| 1599 gtk_widget_show(titlebar_widget()); | 1599 gtk_widget_show(titlebar_widget()); |
| 1600 fullscreen_exit_bubble_.reset(); | 1600 fullscreen_exit_bubble_.reset(); |
| 1601 UpdateCustomFrame(); | 1601 UpdateCustomFrame(); |
| 1602 ShowSupportedWindowFeatures(); | 1602 ShowSupportedWindowFeatures(); |
| 1603 } | 1603 } |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { | |
| 1607 content::NotificationService::current()->Notify( | |
|
Ben Goodger (Google)
2012/06/12 17:42:26
is this notification sent on other platforms alrea
| |
| 1608 chrome::NOTIFICATION_BROWSER_WINDOW_MAXIMIZED, | |
| 1609 content::Source<BrowserWindow>(this), | |
| 1610 content::NotificationService::NoDetails()); | |
| 1611 } | |
| 1612 | |
| 1606 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); | 1613 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); |
| 1607 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1614 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1608 SaveWindowPosition(); | 1615 SaveWindowPosition(); |
| 1609 return FALSE; | 1616 return FALSE; |
| 1610 } | 1617 } |
| 1611 | 1618 |
| 1612 // Callback for the delete event. This event is fired when the user tries to | 1619 // Callback for the delete event. This event is fired when the user tries to |
| 1613 // close the window (e.g., clicking on the X in the window manager title bar). | 1620 // close the window (e.g., clicking on the X in the window manager title bar). |
| 1614 gboolean BrowserWindowGtk::OnMainWindowDeleteEvent(GtkWidget* widget, | 1621 gboolean BrowserWindowGtk::OnMainWindowDeleteEvent(GtkWidget* widget, |
| 1615 GdkEvent* event) { | 1622 GdkEvent* event) { |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2589 wm_type == ui::WM_OPENBOX || | 2596 wm_type == ui::WM_OPENBOX || |
| 2590 wm_type == ui::WM_XFWM4); | 2597 wm_type == ui::WM_XFWM4); |
| 2591 } | 2598 } |
| 2592 | 2599 |
| 2593 // static | 2600 // static |
| 2594 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2601 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2595 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2602 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2596 browser_window_gtk->Init(); | 2603 browser_window_gtk->Init(); |
| 2597 return browser_window_gtk; | 2604 return browser_window_gtk; |
| 2598 } | 2605 } |
| OLD | NEW |