| OLD | NEW |
| 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 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 | 1499 |
| 1500 // static | 1500 // static |
| 1501 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) { | 1501 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs) { |
| 1502 bool custom_frame_default = false; | 1502 bool custom_frame_default = false; |
| 1503 // Avoid checking the window manager if we're not connected to an X server (as | 1503 // Avoid checking the window manager if we're not connected to an X server (as |
| 1504 // is the case in Valgrind tests). | 1504 // is the case in Valgrind tests). |
| 1505 if (ui::XDisplayExists() && | 1505 if (ui::XDisplayExists() && |
| 1506 !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { | 1506 !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) { |
| 1507 custom_frame_default = GetCustomFramePrefDefault(); | 1507 custom_frame_default = GetCustomFramePrefDefault(); |
| 1508 } | 1508 } |
| 1509 prefs->RegisterBooleanPref( | 1509 prefs->RegisterBooleanPref(prefs::kUseCustomChromeFrame, |
| 1510 prefs::kUseCustomChromeFrame, custom_frame_default); | 1510 custom_frame_default, |
| 1511 true /* sync pref */); |
| 1511 } | 1512 } |
| 1512 | 1513 |
| 1513 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) { | 1514 void BrowserWindowGtk::BookmarkBarIsFloating(bool is_floating) { |
| 1514 bookmark_bar_is_floating_ = is_floating; | 1515 bookmark_bar_is_floating_ = is_floating; |
| 1515 toolbar_->UpdateForBookmarkBarVisibility(is_floating); | 1516 toolbar_->UpdateForBookmarkBarVisibility(is_floating); |
| 1516 | 1517 |
| 1517 // This can be NULL during initialization of the bookmark bar. | 1518 // This can be NULL during initialization of the bookmark bar. |
| 1518 if (bookmark_bar_.get()) | 1519 if (bookmark_bar_.get()) |
| 1519 PlaceBookmarkBar(is_floating); | 1520 PlaceBookmarkBar(is_floating); |
| 1520 } | 1521 } |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 // special-case the ones where the custom frame should be used. These names | 2348 // special-case the ones where the custom frame should be used. These names |
| 2348 // are taken from the WMs' source code. | 2349 // are taken from the WMs' source code. |
| 2349 return (wm_name == "Blackbox" || | 2350 return (wm_name == "Blackbox" || |
| 2350 wm_name == "compiz" || | 2351 wm_name == "compiz" || |
| 2351 wm_name == "e16" || // Enlightenment DR16 | 2352 wm_name == "e16" || // Enlightenment DR16 |
| 2352 wm_name == "Metacity" || | 2353 wm_name == "Metacity" || |
| 2353 wm_name == "Mutter" || | 2354 wm_name == "Mutter" || |
| 2354 wm_name == "Openbox" || | 2355 wm_name == "Openbox" || |
| 2355 wm_name == "Xfwm4"); | 2356 wm_name == "Xfwm4"); |
| 2356 } | 2357 } |
| OLD | NEW |