| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1891 GINT_TO_POINTER(iter->first), NULL)); | 1891 GINT_TO_POINTER(iter->first), NULL)); |
| 1892 } | 1892 } |
| 1893 } | 1893 } |
| 1894 | 1894 |
| 1895 void BrowserWindowGtk::UpdateCustomFrame() { | 1895 void BrowserWindowGtk::UpdateCustomFrame() { |
| 1896 gtk_window_set_decorated(window_, !UseCustomFrame()); | 1896 gtk_window_set_decorated(window_, !UseCustomFrame()); |
| 1897 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); | 1897 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); |
| 1898 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1898 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1899 } | 1899 } |
| 1900 | 1900 |
| 1901 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { |
| 1902 return gfx::Size(window_container_->allocation.width - |
| 1903 render_area_floating_container_->allocation.width, |
| 1904 window_container_->allocation.height - |
| 1905 render_area_floating_container_->allocation.height); |
| 1906 } |
| 1907 |
| 1901 void BrowserWindowGtk::SaveWindowPosition() { | 1908 void BrowserWindowGtk::SaveWindowPosition() { |
| 1902 // Browser::SaveWindowPlacement is used for session restore. | 1909 // Browser::SaveWindowPlacement is used for session restore. |
| 1903 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; | 1910 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; |
| 1904 if (IsMaximized()) | 1911 if (IsMaximized()) |
| 1905 show_state = ui::SHOW_STATE_MAXIMIZED; | 1912 show_state = ui::SHOW_STATE_MAXIMIZED; |
| 1906 else if (IsMinimized()) | 1913 else if (IsMinimized()) |
| 1907 show_state = ui::SHOW_STATE_MINIMIZED; | 1914 show_state = ui::SHOW_STATE_MINIMIZED; |
| 1908 | 1915 |
| 1909 if (browser_->ShouldSaveWindowPlacement()) | 1916 if (browser_->ShouldSaveWindowPlacement()) |
| 1910 browser_->SaveWindowPlacement(restored_bounds_, show_state); | 1917 browser_->SaveWindowPlacement(restored_bounds_, show_state); |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 // are taken from the WMs' source code. | 2386 // are taken from the WMs' source code. |
| 2380 return (wm_name == "Blackbox" || | 2387 return (wm_name == "Blackbox" || |
| 2381 wm_name == "compiz" || | 2388 wm_name == "compiz" || |
| 2382 wm_name == "Compiz" || | 2389 wm_name == "Compiz" || |
| 2383 wm_name == "e16" || // Enlightenment DR16 | 2390 wm_name == "e16" || // Enlightenment DR16 |
| 2384 wm_name == "Metacity" || | 2391 wm_name == "Metacity" || |
| 2385 wm_name == "Mutter" || | 2392 wm_name == "Mutter" || |
| 2386 wm_name == "Openbox" || | 2393 wm_name == "Openbox" || |
| 2387 wm_name == "Xfwm4"); | 2394 wm_name == "Xfwm4"); |
| 2388 } | 2395 } |
| OLD | NEW |