| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 if (!GetBrowserWindowForNativeWindow(window)) | 1510 if (!GetBrowserWindowForNativeWindow(window)) |
| 1511 return NULL; | 1511 return NULL; |
| 1512 return window; | 1512 return window; |
| 1513 } | 1513 } |
| 1514 | 1514 |
| 1515 GtkWidget* BrowserWindowGtk::titlebar_widget() const { | 1515 GtkWidget* BrowserWindowGtk::titlebar_widget() const { |
| 1516 return titlebar_->widget(); | 1516 return titlebar_->widget(); |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 // static | 1519 // static |
| 1520 void BrowserWindowGtk::RegisterUserPrefs( | 1520 void BrowserWindowGtk::RegisterProfilePrefs( |
| 1521 user_prefs::PrefRegistrySyncable* registry) { | 1521 user_prefs::PrefRegistrySyncable* registry) { |
| 1522 bool custom_frame_default = false; | 1522 bool custom_frame_default = false; |
| 1523 // Avoid checking the window manager if we're not connected to an X server (as | 1523 // Avoid checking the window manager if we're not connected to an X server (as |
| 1524 // is the case in Valgrind tests). | 1524 // is the case in Valgrind tests). |
| 1525 if (ui::XDisplayExists()) | 1525 if (ui::XDisplayExists()) |
| 1526 custom_frame_default = GetCustomFramePrefDefault(); | 1526 custom_frame_default = GetCustomFramePrefDefault(); |
| 1527 | 1527 |
| 1528 registry->RegisterBooleanPref( | 1528 registry->RegisterBooleanPref( |
| 1529 prefs::kUseCustomChromeFrame, | 1529 prefs::kUseCustomChromeFrame, |
| 1530 custom_frame_default, | 1530 custom_frame_default, |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2417 wm_type == ui::WM_OPENBOX || | 2417 wm_type == ui::WM_OPENBOX || |
| 2418 wm_type == ui::WM_XFWM4); | 2418 wm_type == ui::WM_XFWM4); |
| 2419 } | 2419 } |
| 2420 | 2420 |
| 2421 // static | 2421 // static |
| 2422 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2422 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2423 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2423 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2424 browser_window_gtk->Init(); | 2424 browser_window_gtk->Init(); |
| 2425 return browser_window_gtk; | 2425 return browser_window_gtk; |
| 2426 } | 2426 } |
| OLD | NEW |