| 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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 accel_group_, | 1903 accel_group_, |
| 1904 iter->second.GetGdkKeyCode(), | 1904 iter->second.GetGdkKeyCode(), |
| 1905 static_cast<GdkModifierType>(iter->second.modifiers()), | 1905 static_cast<GdkModifierType>(iter->second.modifiers()), |
| 1906 GtkAccelFlags(0), | 1906 GtkAccelFlags(0), |
| 1907 g_cclosure_new(G_CALLBACK(OnGtkAccelerator), | 1907 g_cclosure_new(G_CALLBACK(OnGtkAccelerator), |
| 1908 GINT_TO_POINTER(iter->first), NULL)); | 1908 GINT_TO_POINTER(iter->first), NULL)); |
| 1909 } | 1909 } |
| 1910 } | 1910 } |
| 1911 | 1911 |
| 1912 void BrowserWindowGtk::UpdateCustomFrame() { | 1912 void BrowserWindowGtk::UpdateCustomFrame() { |
| 1913 gtk_window_set_decorated(window_, !UseCustomFrame()); | 1913 gtk_window_set_decorated( |
| 1914 window_, !UseCustomFrame() && browser_->type() != Browser::TYPE_SHELL); |
| 1914 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); | 1915 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); |
| 1915 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1916 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1916 } | 1917 } |
| 1917 | 1918 |
| 1918 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { | 1919 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { |
| 1919 return gfx::Size(window_container_->allocation.width - | 1920 return gfx::Size(window_container_->allocation.width - |
| 1920 render_area_floating_container_->allocation.width, | 1921 render_area_floating_container_->allocation.width, |
| 1921 window_container_->allocation.height - | 1922 window_container_->allocation.height - |
| 1922 render_area_floating_container_->allocation.height); | 1923 render_area_floating_container_->allocation.height); |
| 1923 } | 1924 } |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 wm_type == ui::WM_OPENBOX || | 2429 wm_type == ui::WM_OPENBOX || |
| 2429 wm_type == ui::WM_XFWM4); | 2430 wm_type == ui::WM_XFWM4); |
| 2430 } | 2431 } |
| 2431 | 2432 |
| 2432 // static | 2433 // static |
| 2433 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2434 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2434 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2435 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2435 browser_window_gtk->Init(); | 2436 browser_window_gtk->Init(); |
| 2436 return browser_window_gtk; | 2437 return browser_window_gtk; |
| 2437 } | 2438 } |
| OLD | NEW |