Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 1505
1506 // static 1506 // static
1507 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) { 1507 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) {
1508 bool custom_frame_default = false; 1508 bool custom_frame_default = false;
1509 // Avoid checking the window manager if we're not connected to an X server (as 1509 // Avoid checking the window manager if we're not connected to an X server (as
1510 // is the case in Valgrind tests). 1510 // is the case in Valgrind tests).
1511 if (ui::XDisplayExists() && 1511 if (ui::XDisplayExists() &&
1512 !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { 1512 !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) {
1513 custom_frame_default = GetCustomFramePrefDefault(); 1513 custom_frame_default = GetCustomFramePrefDefault();
1514 } 1514 }
1515 prefs->RegisterBooleanPref( 1515 prefs->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
1516 prefs::kUseCustomChromeFrame, custom_frame_default); 1516 custom_frame_default,
1517 true /* sync pref */);
1517 } 1518 }
1518 1519
1519 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) { 1520 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) {
1520 bookmark_bar_is_floating_ = is_floating; 1521 bookmark_bar_is_floating_ = is_floating;
1521 toolbar_->UpdateForBookmarkBarVisibility(is_floating); 1522 toolbar_->UpdateForBookmarkBarVisibility(is_floating);
1522 1523
1523 // This can be NULL during initialization of the bookmark bar. 1524 // This can be NULL during initialization of the bookmark bar.
1524 if (bookmark_bar_.get()) 1525 if (bookmark_bar_.get())
1525 PlaceBookmarkBar(is_floating); 1526 PlaceBookmarkBar(is_floating);
1526 } 1527 }
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 // are taken from the WMs' source code. 2355 // are taken from the WMs' source code.
2355 return (wm_name == "Blackbox" || 2356 return (wm_name == "Blackbox" ||
2356 wm_name == "compiz" || 2357 wm_name == "compiz" ||
2357 wm_name == "Compiz" || 2358 wm_name == "Compiz" ||
2358 wm_name == "e16" || // Enlightenment DR16 2359 wm_name == "e16" || // Enlightenment DR16
2359 wm_name == "Metacity" || 2360 wm_name == "Metacity" ||
2360 wm_name == "Mutter" || 2361 wm_name == "Mutter" ||
2361 wm_name == "Openbox" || 2362 wm_name == "Openbox" ||
2362 wm_name == "Xfwm4"); 2363 wm_name == "Xfwm4");
2363 } 2364 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698