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