| 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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1489   if (!GetBrowserWindowForNativeWindow(window)) | 1489   if (!GetBrowserWindowForNativeWindow(window)) | 
| 1490     return NULL; | 1490     return NULL; | 
| 1491   return window; | 1491   return window; | 
| 1492 } | 1492 } | 
| 1493 | 1493 | 
| 1494 GtkWidget* BrowserWindowGtk::titlebar_widget() const { | 1494 GtkWidget* BrowserWindowGtk::titlebar_widget() const { | 
| 1495   return titlebar_->widget(); | 1495   return titlebar_->widget(); | 
| 1496 } | 1496 } | 
| 1497 | 1497 | 
| 1498 // static | 1498 // static | 
| 1499 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) { | 1499 void BrowserWindowGtk::RegisterUserPrefs(PrefServiceSyncable* prefs) { | 
| 1500   bool custom_frame_default = false; | 1500   bool custom_frame_default = false; | 
| 1501   // Avoid checking the window manager if we're not connected to an X server (as | 1501   // Avoid checking the window manager if we're not connected to an X server (as | 
| 1502   // is the case in Valgrind tests). | 1502   // is the case in Valgrind tests). | 
| 1503   if (ui::XDisplayExists() && | 1503   if (ui::XDisplayExists() && | 
| 1504       !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { | 1504       !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { | 
| 1505     custom_frame_default = GetCustomFramePrefDefault(); | 1505     custom_frame_default = GetCustomFramePrefDefault(); | 
| 1506   } | 1506   } | 
| 1507   prefs->RegisterBooleanPref(prefs::kUseCustomChromeFrame, | 1507   prefs->RegisterBooleanPref(prefs::kUseCustomChromeFrame, | 
| 1508                              custom_frame_default, | 1508                              custom_frame_default, | 
| 1509                              PrefService::SYNCABLE_PREF); | 1509                              PrefServiceSyncable::SYNCABLE_PREF); | 
| 1510 } | 1510 } | 
| 1511 | 1511 | 
| 1512 WebContents* BrowserWindowGtk::GetDisplayedTab() { | 1512 WebContents* BrowserWindowGtk::GetDisplayedTab() { | 
| 1513   return contents_container_->GetVisibleTab(); | 1513   return contents_container_->GetVisibleTab(); | 
| 1514 } | 1514 } | 
| 1515 | 1515 | 
| 1516 void BrowserWindowGtk::QueueToolbarRedraw() { | 1516 void BrowserWindowGtk::QueueToolbarRedraw() { | 
| 1517   gtk_widget_queue_draw(toolbar_->widget()); | 1517   gtk_widget_queue_draw(toolbar_->widget()); | 
| 1518 } | 1518 } | 
| 1519 | 1519 | 
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2410           wm_type == ui::WM_OPENBOX || | 2410           wm_type == ui::WM_OPENBOX || | 
| 2411           wm_type == ui::WM_XFWM4); | 2411           wm_type == ui::WM_XFWM4); | 
| 2412 } | 2412 } | 
| 2413 | 2413 | 
| 2414 // static | 2414 // static | 
| 2415 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2415 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 
| 2416   BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2416   BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 
| 2417   browser_window_gtk->Init(); | 2417   browser_window_gtk->Init(); | 
| 2418   return browser_window_gtk; | 2418   return browser_window_gtk; | 
| 2419 } | 2419 } | 
| OLD | NEW | 
|---|