 Chromium Code Reviews
 Chromium Code Reviews Issue 12256040:
  Second batch of fixing prefs registrations.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 12256040:
  Second batch of fixing prefs registrations.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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()) { | 
| 
Mattias Nissler (ping if slow)
2013/02/15 12:23:15
nit: no need for curlies any longer.
 
Jói
2013/02/18 16:05:42
Done.
 | |
| 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 } | 
| (...skipping 902 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 |