OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/browser_view_prefs.h" | 5 #include "chrome/browser/ui/browser_view_prefs.h" |
6 | 6 |
7 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_registry_simple.h" |
8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 // How long do we wait before we consider a window hung (in ms). | 12 // How long do we wait before we consider a window hung (in ms). |
13 const int kDefaultPluginMessageResponseTimeout = 25000; | 13 const int kDefaultPluginMessageResponseTimeout = 25000; |
14 | 14 |
15 // How frequently we check for hung plugin windows. | 15 // How frequently we check for hung plugin windows. |
16 const int kDefaultHungPluginDetectFrequency = 2000; | 16 const int kDefaultHungPluginDetectFrequency = 2000; |
17 | 17 |
18 } // namespace | 18 } // namespace |
19 | 19 |
20 namespace chrome { | 20 namespace chrome { |
21 | 21 |
22 void RegisterBrowserViewPrefs(PrefServiceSimple* prefs) { | 22 void RegisterBrowserViewPrefs(PrefRegistrySimple* registry) { |
23 prefs->RegisterIntegerPref(prefs::kPluginMessageResponseTimeout, | 23 registry->RegisterIntegerPref(prefs::kPluginMessageResponseTimeout, |
24 kDefaultPluginMessageResponseTimeout); | 24 kDefaultPluginMessageResponseTimeout); |
25 prefs->RegisterIntegerPref(prefs::kHungPluginDetectFrequency, | 25 registry->RegisterIntegerPref(prefs::kHungPluginDetectFrequency, |
26 kDefaultHungPluginDetectFrequency); | 26 kDefaultHungPluginDetectFrequency); |
27 } | 27 } |
28 | 28 |
29 } // namespace chrome | 29 } // namespace chrome |
OLD | NEW |