| 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1479   if (!GetBrowserWindowForNativeWindow(window)) | 1479   if (!GetBrowserWindowForNativeWindow(window)) | 
| 1480     return NULL; | 1480     return NULL; | 
| 1481   return window; | 1481   return window; | 
| 1482 } | 1482 } | 
| 1483 | 1483 | 
| 1484 GtkWidget* BrowserWindowGtk::titlebar_widget() const { | 1484 GtkWidget* BrowserWindowGtk::titlebar_widget() const { | 
| 1485   return titlebar_->widget(); | 1485   return titlebar_->widget(); | 
| 1486 } | 1486 } | 
| 1487 | 1487 | 
| 1488 // static | 1488 // static | 
| 1489 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs, | 1489 void BrowserWindowGtk::RegisterUserPrefs(PrefRegistrySyncable* registry) { | 
| 1490                                          PrefRegistrySyncable* registry) { |  | 
| 1491   // TODO(joi): Remove PrefService parameter. |  | 
| 1492   bool custom_frame_default = false; | 1490   bool custom_frame_default = false; | 
| 1493   // Avoid checking the window manager if we're not connected to an X server (as | 1491   // Avoid checking the window manager if we're not connected to an X server (as | 
| 1494   // is the case in Valgrind tests). | 1492   // is the case in Valgrind tests). | 
| 1495   if (ui::XDisplayExists() && | 1493   if (ui::XDisplayExists()) | 
| 1496       !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { |  | 
| 1497     custom_frame_default = GetCustomFramePrefDefault(); | 1494     custom_frame_default = GetCustomFramePrefDefault(); | 
| 1498   } | 1495 | 
| 1499   registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, | 1496   registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, | 
| 1500                                 custom_frame_default, | 1497                                 custom_frame_default, | 
| 1501                                 PrefRegistrySyncable::UNSYNCABLE_PREF); | 1498                                 PrefRegistrySyncable::UNSYNCABLE_PREF); | 
| 1502 } | 1499 } | 
| 1503 | 1500 | 
| 1504 WebContents* BrowserWindowGtk::GetDisplayedTab() { | 1501 WebContents* BrowserWindowGtk::GetDisplayedTab() { | 
| 1505   return contents_container_->GetVisibleTab(); | 1502   return contents_container_->GetVisibleTab(); | 
| 1506 } | 1503 } | 
| 1507 | 1504 | 
| 1508 void BrowserWindowGtk::QueueToolbarRedraw() { | 1505 void BrowserWindowGtk::QueueToolbarRedraw() { | 
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2409           wm_type == ui::WM_OPENBOX || | 2406           wm_type == ui::WM_OPENBOX || | 
| 2410           wm_type == ui::WM_XFWM4); | 2407           wm_type == ui::WM_XFWM4); | 
| 2411 } | 2408 } | 
| 2412 | 2409 | 
| 2413 // static | 2410 // static | 
| 2414 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2411 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 
| 2415   BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2412   BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 
| 2416   browser_window_gtk->Init(); | 2413   browser_window_gtk->Init(); | 
| 2417   return browser_window_gtk; | 2414   return browser_window_gtk; | 
| 2418 } | 2415 } | 
| OLD | NEW | 
|---|