| 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 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 accel_group_, | 1910 accel_group_, |
| 1911 iter->second.GetGdkKeyCode(), | 1911 iter->second.GetGdkKeyCode(), |
| 1912 static_cast<GdkModifierType>(iter->second.modifiers()), | 1912 static_cast<GdkModifierType>(iter->second.modifiers()), |
| 1913 GtkAccelFlags(0), | 1913 GtkAccelFlags(0), |
| 1914 g_cclosure_new(G_CALLBACK(OnGtkAccelerator), | 1914 g_cclosure_new(G_CALLBACK(OnGtkAccelerator), |
| 1915 GINT_TO_POINTER(iter->first), NULL)); | 1915 GINT_TO_POINTER(iter->first), NULL)); |
| 1916 } | 1916 } |
| 1917 } | 1917 } |
| 1918 | 1918 |
| 1919 void BrowserWindowGtk::UpdateCustomFrame() { | 1919 void BrowserWindowGtk::UpdateCustomFrame() { |
| 1920 gtk_window_set_decorated( | 1920 gtk_window_set_decorated(window_, !UseCustomFrame()); |
| 1921 window_, !UseCustomFrame() && browser_->type() != Browser::TYPE_SHELL); | |
| 1922 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); | 1921 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); |
| 1923 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1922 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1924 } | 1923 } |
| 1925 | 1924 |
| 1926 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { | 1925 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { |
| 1927 GtkAllocation window_container_allocation; | 1926 GtkAllocation window_container_allocation; |
| 1928 gtk_widget_get_allocation(window_container_, &window_container_allocation); | 1927 gtk_widget_get_allocation(window_container_, &window_container_allocation); |
| 1929 GtkAllocation render_area_floating_container_allocation; | 1928 GtkAllocation render_area_floating_container_allocation; |
| 1930 gtk_widget_get_allocation(render_area_floating_container_, | 1929 gtk_widget_get_allocation(render_area_floating_container_, |
| 1931 &render_area_floating_container_allocation); | 1930 &render_area_floating_container_allocation); |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2450 wm_type == ui::WM_OPENBOX || | 2449 wm_type == ui::WM_OPENBOX || |
| 2451 wm_type == ui::WM_XFWM4); | 2450 wm_type == ui::WM_XFWM4); |
| 2452 } | 2451 } |
| 2453 | 2452 |
| 2454 // static | 2453 // static |
| 2455 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2454 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2456 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2455 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2457 browser_window_gtk->Init(); | 2456 browser_window_gtk->Init(); |
| 2458 return browser_window_gtk; | 2457 return browser_window_gtk; |
| 2459 } | 2458 } |
| OLD | NEW |