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

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: Really fix. And rebase 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 PrefService::SYNCABLE_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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 // are taken from the WMs' source code. 2363 // are taken from the WMs' source code.
2363 return (wm_name == "Blackbox" || 2364 return (wm_name == "Blackbox" ||
2364 wm_name == "compiz" || 2365 wm_name == "compiz" ||
2365 wm_name == "Compiz" || 2366 wm_name == "Compiz" ||
2366 wm_name == "e16" || // Enlightenment DR16 2367 wm_name == "e16" || // Enlightenment DR16
2367 wm_name == "Metacity" || 2368 wm_name == "Metacity" ||
2368 wm_name == "Mutter" || 2369 wm_name == "Mutter" ||
2369 wm_name == "Openbox" || 2370 wm_name == "Openbox" ||
2370 wm_name == "Xfwm4"); 2371 wm_name == "Xfwm4");
2371 } 2372 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm ('k') | chrome/browser/ui/tab_contents/tab_contents_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698