Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: chrome/browser/ui/browser_ui_prefs.cc

Issue 22986010: Add policy for fullscreen mode; disallow fullscreen in public sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test compilation after rebase. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 #if !defined(OS_MACOSX)
195 registry->RegisterBooleanPref(
196 prefs::kFullscreenAllowed,
197 true,
198 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
199 #endif
194 } 200 }
195 201
196 void RegisterAppPrefs(const std::string& app_name, Profile* profile) { 202 void RegisterAppPrefs(const std::string& app_name, Profile* profile) {
197 // We need to register the window position pref. 203 // We need to register the window position pref.
198 // 204 //
199 // TODO(mnissler): Use a separate pref name pointing to a single 205 // TODO(mnissler): Use a separate pref name pointing to a single
200 // dictionary instead. Also tracked as http://crbug.com/167256 206 // dictionary instead. Also tracked as http://crbug.com/167256
201 std::string window_pref(prefs::kBrowserWindowPlacement); 207 std::string window_pref(prefs::kBrowserWindowPlacement);
202 window_pref.append("_"); 208 window_pref.append("_");
203 window_pref.append(app_name); 209 window_pref.append(app_name);
204 PrefService* prefs = profile->GetPrefs(); 210 PrefService* prefs = profile->GetPrefs();
205 if (!prefs->FindPreference(window_pref.c_str())) { 211 if (!prefs->FindPreference(window_pref.c_str())) {
206 // TODO(joi): Do all registration up front. 212 // TODO(joi): Do all registration up front.
207 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( 213 scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
208 static_cast<user_prefs::PrefRegistrySyncable*>( 214 static_cast<user_prefs::PrefRegistrySyncable*>(
209 prefs->DeprecatedGetPrefRegistry())); 215 prefs->DeprecatedGetPrefRegistry()));
210 registry->RegisterDictionaryPref( 216 registry->RegisterDictionaryPref(
211 window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 217 window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
212 } 218 }
213 } 219 }
214 220
215 221
216 } // namespace chrome 222 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/fullscreen/fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698