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