1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/browser_view_prefs.h"
7 #include "base/prefs/pref_registry_simple.h"
8 #include "chrome/common/pref_names.h"
9 #include "components/user_prefs/pref_registry_syncable.h"
11 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
12 #include "ui/base/x/x11_util.h"
17 // How long do we wait before we consider a window hung (in ms).
18 const int kDefaultPluginMessageResponseTimeout
= 25000;
20 // How frequently we check for hung plugin windows.
21 const int kDefaultHungPluginDetectFrequency
= 2000;
27 void RegisterBrowserViewLocalPrefs(PrefRegistrySimple
* registry
) {
28 registry
->RegisterIntegerPref(prefs::kPluginMessageResponseTimeout
,
29 kDefaultPluginMessageResponseTimeout
);
30 registry
->RegisterIntegerPref(prefs::kHungPluginDetectFrequency
,
31 kDefaultHungPluginDetectFrequency
);
34 void RegisterBrowserViewProfilePrefs(
35 user_prefs::PrefRegistrySyncable
* registry
) {
36 bool custom_frame_default
= false;
37 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
38 custom_frame_default
= ui::GetCustomFramePrefDefault();
41 registry
->RegisterBooleanPref(
42 prefs::kUseCustomChromeFrame
,
44 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF
);