OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
11 | 11 |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 accel_group_, | 1974 accel_group_, |
1975 iter->second.GetGdkKeyCode(), | 1975 iter->second.GetGdkKeyCode(), |
1976 static_cast<GdkModifierType>(iter->second.modifiers()), | 1976 static_cast<GdkModifierType>(iter->second.modifiers()), |
1977 GtkAccelFlags(0), | 1977 GtkAccelFlags(0), |
1978 g_cclosure_new(G_CALLBACK(OnGtkAccelerator), | 1978 g_cclosure_new(G_CALLBACK(OnGtkAccelerator), |
1979 GINT_TO_POINTER(iter->first), NULL)); | 1979 GINT_TO_POINTER(iter->first), NULL)); |
1980 } | 1980 } |
1981 } | 1981 } |
1982 | 1982 |
1983 void BrowserWindowGtk::UpdateCustomFrame() { | 1983 void BrowserWindowGtk::UpdateCustomFrame() { |
1984 gtk_window_set_decorated( | 1984 gtk_window_set_decorated(window_, !UseCustomFrame()); |
1985 window_, !UseCustomFrame() && browser_->type() != Browser::TYPE_SHELL); | |
1986 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); | 1985 titlebar_->UpdateCustomFrame(UseCustomFrame() && !IsFullscreen()); |
1987 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1986 UpdateWindowShape(bounds_.width(), bounds_.height()); |
1988 } | 1987 } |
1989 | 1988 |
1990 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { | 1989 gfx::Size BrowserWindowGtk::GetNonClientFrameSize() const { |
1991 GtkAllocation window_container_allocation; | 1990 GtkAllocation window_container_allocation; |
1992 gtk_widget_get_allocation(window_container_, &window_container_allocation); | 1991 gtk_widget_get_allocation(window_container_, &window_container_allocation); |
1993 GtkAllocation render_area_floating_container_allocation; | 1992 GtkAllocation render_area_floating_container_allocation; |
1994 gtk_widget_get_allocation(render_area_floating_container_, | 1993 gtk_widget_get_allocation(render_area_floating_container_, |
1995 &render_area_floating_container_allocation); | 1994 &render_area_floating_container_allocation); |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 wm_type == ui::WM_OPENBOX || | 2513 wm_type == ui::WM_OPENBOX || |
2515 wm_type == ui::WM_XFWM4); | 2514 wm_type == ui::WM_XFWM4); |
2516 } | 2515 } |
2517 | 2516 |
2518 // static | 2517 // static |
2519 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2518 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2520 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2519 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
2521 browser_window_gtk->Init(); | 2520 browser_window_gtk->Init(); |
2522 return browser_window_gtk; | 2521 return browser_window_gtk; |
2523 } | 2522 } |
OLD | NEW |