Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / ui / browser_view_prefs.cc
blob5e98fcfa83f55e433532c4d38ab36cca0f02f3db
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"
13 #endif
15 namespace {
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;
23 } // namespace
25 namespace chrome {
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();
39 #endif
41 registry->RegisterBooleanPref(
42 prefs::kUseCustomChromeFrame,
43 custom_frame_default,
44 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
47 } // namespace chrome