| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 #include <X11/XF86keysym.h> | 8 #include <X11/XF86keysym.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "chrome/browser/gtk/bookmark_bar_gtk.h" | 39 #include "chrome/browser/gtk/bookmark_bar_gtk.h" |
| 40 #include "chrome/browser/gtk/bookmark_manager_gtk.h" | 40 #include "chrome/browser/gtk/bookmark_manager_gtk.h" |
| 41 #include "chrome/browser/gtk/browser_titlebar.h" | 41 #include "chrome/browser/gtk/browser_titlebar.h" |
| 42 #include "chrome/browser/gtk/browser_toolbar_gtk.h" | 42 #include "chrome/browser/gtk/browser_toolbar_gtk.h" |
| 43 #include "chrome/browser/gtk/cairo_cached_surface.h" | 43 #include "chrome/browser/gtk/cairo_cached_surface.h" |
| 44 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" | 44 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" |
| 45 #include "chrome/browser/gtk/download_in_progress_dialog_gtk.h" | 45 #include "chrome/browser/gtk/download_in_progress_dialog_gtk.h" |
| 46 #include "chrome/browser/gtk/download_shelf_gtk.h" | 46 #include "chrome/browser/gtk/download_shelf_gtk.h" |
| 47 #include "chrome/browser/gtk/edit_search_engine_dialog.h" | 47 #include "chrome/browser/gtk/edit_search_engine_dialog.h" |
| 48 #include "chrome/browser/gtk/find_bar_gtk.h" | 48 #include "chrome/browser/gtk/find_bar_gtk.h" |
| 49 #include "chrome/browser/gtk/fullscreen_exit_bubble_gtk.h" |
| 49 #include "chrome/browser/gtk/gtk_floating_container.h" | 50 #include "chrome/browser/gtk/gtk_floating_container.h" |
| 50 #include "chrome/browser/gtk/go_button_gtk.h" | 51 #include "chrome/browser/gtk/go_button_gtk.h" |
| 51 #include "chrome/browser/gtk/gtk_theme_provider.h" | 52 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 52 #include "chrome/browser/gtk/import_dialog_gtk.h" | 53 #include "chrome/browser/gtk/import_dialog_gtk.h" |
| 53 #include "chrome/browser/gtk/info_bubble_gtk.h" | 54 #include "chrome/browser/gtk/info_bubble_gtk.h" |
| 54 #include "chrome/browser/gtk/infobar_container_gtk.h" | 55 #include "chrome/browser/gtk/infobar_container_gtk.h" |
| 55 #include "chrome/browser/gtk/keyword_editor_view.h" | 56 #include "chrome/browser/gtk/keyword_editor_view.h" |
| 56 #include "chrome/browser/gtk/nine_box.h" | 57 #include "chrome/browser/gtk/nine_box.h" |
| 57 #include "chrome/browser/gtk/repost_form_warning_gtk.h" | 58 #include "chrome/browser/gtk/repost_form_warning_gtk.h" |
| 58 #include "chrome/browser/gtk/status_bubble_gtk.h" | 59 #include "chrome/browser/gtk/status_bubble_gtk.h" |
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 | 1419 |
| 1419 if (changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { | 1420 if (changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { |
| 1420 bool is_fullscreen = state & GDK_WINDOW_STATE_FULLSCREEN; | 1421 bool is_fullscreen = state & GDK_WINDOW_STATE_FULLSCREEN; |
| 1421 browser_->UpdateCommandsForFullscreenMode(is_fullscreen); | 1422 browser_->UpdateCommandsForFullscreenMode(is_fullscreen); |
| 1422 if (is_fullscreen) { | 1423 if (is_fullscreen) { |
| 1423 UpdateCustomFrame(); | 1424 UpdateCustomFrame(); |
| 1424 toolbar_->Hide(); | 1425 toolbar_->Hide(); |
| 1425 tabstrip_->Hide(); | 1426 tabstrip_->Hide(); |
| 1426 if (IsBookmarkBarSupported()) | 1427 if (IsBookmarkBarSupported()) |
| 1427 bookmark_bar_->EnterFullscreen(); | 1428 bookmark_bar_->EnterFullscreen(); |
| 1429 fullscreen_exit_bubble_.reset(new FullscreenExitBubbleGtk( |
| 1430 GTK_FLOATING_CONTAINER(render_area_floating_container_))); |
| 1428 gtk_widget_hide(toolbar_border_); | 1431 gtk_widget_hide(toolbar_border_); |
| 1429 #if defined(OS_CHROMEOS) | 1432 #if defined(OS_CHROMEOS) |
| 1430 if (main_menu_button_) | 1433 if (main_menu_button_) |
| 1431 gtk_widget_hide(main_menu_button_->widget()); | 1434 gtk_widget_hide(main_menu_button_->widget()); |
| 1432 if (compact_navbar_hbox_) | 1435 if (compact_navbar_hbox_) |
| 1433 gtk_widget_hide(compact_navbar_hbox_); | 1436 gtk_widget_hide(compact_navbar_hbox_); |
| 1434 if (status_area_) | 1437 if (status_area_) |
| 1435 status_area_->GetWidget()->Hide(); | 1438 status_area_->GetWidget()->Hide(); |
| 1436 #endif | 1439 #endif |
| 1437 } else { | 1440 } else { |
| 1441 fullscreen_exit_bubble_.reset(); |
| 1438 UpdateCustomFrame(); | 1442 UpdateCustomFrame(); |
| 1439 ShowSupportedWindowFeatures(); | 1443 ShowSupportedWindowFeatures(); |
| 1440 | 1444 |
| 1441 gtk_widget_show(toolbar_border_); | 1445 gtk_widget_show(toolbar_border_); |
| 1442 gdk_window_lower(toolbar_border_->window); | 1446 gdk_window_lower(toolbar_border_->window); |
| 1443 } | 1447 } |
| 1444 } | 1448 } |
| 1445 | 1449 |
| 1446 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1450 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1447 SaveWindowPosition(); | 1451 SaveWindowPosition(); |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 // are taken from the WMs' source code. | 2335 // are taken from the WMs' source code. |
| 2332 return (wm_name == "Blackbox" || | 2336 return (wm_name == "Blackbox" || |
| 2333 wm_name == "compiz" || | 2337 wm_name == "compiz" || |
| 2334 wm_name == "e16" || // Enlightenment DR16 | 2338 wm_name == "e16" || // Enlightenment DR16 |
| 2335 wm_name == "KWin" || | 2339 wm_name == "KWin" || |
| 2336 wm_name == "Metacity" || | 2340 wm_name == "Metacity" || |
| 2337 wm_name == "Mutter" || | 2341 wm_name == "Mutter" || |
| 2338 wm_name == "Openbox" || | 2342 wm_name == "Openbox" || |
| 2339 wm_name == "Xfwm4"); | 2343 wm_name == "Xfwm4"); |
| 2340 } | 2344 } |
| OLD | NEW |