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_ui_prefs.h" | 5 #include "chrome/browser/ui/browser_ui_prefs.h" |
6 | 6 |
7 #include "base/prefs/pref_registry_simple.h" | 7 #include "base/prefs/pref_registry_simple.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/first_run/first_run.h" | 9 #include "chrome/browser/first_run/first_run.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 false, | 184 false, |
185 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 185 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
186 registry->RegisterBooleanPref( | 186 registry->RegisterBooleanPref( |
187 prefs::kClearPluginLSODataEnabled, | 187 prefs::kClearPluginLSODataEnabled, |
188 true, | 188 true, |
189 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 189 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
190 registry->RegisterBooleanPref( | 190 registry->RegisterBooleanPref( |
191 prefs::kHideWebStoreIcon, | 191 prefs::kHideWebStoreIcon, |
192 false, | 192 false, |
193 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 193 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 194 registry->RegisterBooleanPref( |
| 195 prefs::kAllowFullscreen, |
| 196 true, |
| 197 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
194 } | 198 } |
195 | 199 |
196 void RegisterAppPrefs(const std::string& app_name, Profile* profile) { | 200 void RegisterAppPrefs(const std::string& app_name, Profile* profile) { |
197 // We need to register the window position pref. | 201 // We need to register the window position pref. |
198 // | 202 // |
199 // TODO(mnissler): Use a separate pref name pointing to a single | 203 // TODO(mnissler): Use a separate pref name pointing to a single |
200 // dictionary instead. Also tracked as http://crbug.com/167256 | 204 // dictionary instead. Also tracked as http://crbug.com/167256 |
201 std::string window_pref(prefs::kBrowserWindowPlacement); | 205 std::string window_pref(prefs::kBrowserWindowPlacement); |
202 window_pref.append("_"); | 206 window_pref.append("_"); |
203 window_pref.append(app_name); | 207 window_pref.append(app_name); |
204 PrefService* prefs = profile->GetPrefs(); | 208 PrefService* prefs = profile->GetPrefs(); |
205 if (!prefs->FindPreference(window_pref.c_str())) { | 209 if (!prefs->FindPreference(window_pref.c_str())) { |
206 // TODO(joi): Do all registration up front. | 210 // TODO(joi): Do all registration up front. |
207 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( | 211 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( |
208 static_cast<user_prefs::PrefRegistrySyncable*>( | 212 static_cast<user_prefs::PrefRegistrySyncable*>( |
209 prefs->DeprecatedGetPrefRegistry())); | 213 prefs->DeprecatedGetPrefRegistry())); |
210 registry->RegisterDictionaryPref( | 214 registry->RegisterDictionaryPref( |
211 window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 215 window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
212 } | 216 } |
213 } | 217 } |
214 | 218 |
215 | 219 |
216 } // namespace chrome | 220 } // namespace chrome |
OLD | NEW |