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

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

Issue 1650713003: Preference for Presentation Mode/Fullscreen Toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/first_run/first_run.h" 8 #include "chrome/browser/first_run/first_run.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 19 matching lines...) Expand all
30 30
31 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { 31 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
32 registry->RegisterBooleanPref( 32 registry->RegisterBooleanPref(
33 prefs::kHomePageIsNewTabPage, 33 prefs::kHomePageIsNewTabPage,
34 true, 34 true,
35 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 35 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
36 registry->RegisterBooleanPref( 36 registry->RegisterBooleanPref(
37 prefs::kShowHomeButton, 37 prefs::kShowHomeButton,
38 false, 38 false,
39 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 39 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
40 #if defined(OS_MACOSX)
41 // This really belongs in platform code, but there's no good place to
42 // initialize it between the time when the AppController is created
43 // (where there's no profile) and the time the controller gets another
44 // crack at the start of the main event loop. By that time,
45 // StartupBrowserCreator has already created the browser window, and it's too
46 // late: we need the pref to be already initialized. Doing it here also saves
47 // us from having to hard-code pref registration in the several unit tests
48 // that use this preference.
49 registry->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true);
50 #endif
51 registry->RegisterBooleanPref( 40 registry->RegisterBooleanPref(
52 prefs::kDeleteBrowsingHistory, 41 prefs::kDeleteBrowsingHistory,
53 true, 42 true,
54 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 43 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
55 registry->RegisterBooleanPref( 44 registry->RegisterBooleanPref(
56 prefs::kDeleteDownloadHistory, 45 prefs::kDeleteDownloadHistory,
57 true, 46 true,
58 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 47 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
59 registry->RegisterBooleanPref( 48 registry->RegisterBooleanPref(
60 prefs::kDeleteCache, 49 prefs::kDeleteCache,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 registry->RegisterDictionaryPref( 117 registry->RegisterDictionaryPref(
129 prefs::kDefaultTasksBySuffix, 118 prefs::kDefaultTasksBySuffix,
130 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 119 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
131 120
132 // We need to register the type of these preferences in order to query 121 // We need to register the type of these preferences in order to query
133 // them even though they're only typically controlled via policy. 122 // them even though they're only typically controlled via policy.
134 registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false); 123 registry->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false);
135 registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false); 124 registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false);
136 registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true); 125 registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true);
137 registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, false); 126 registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, false);
138 #if !defined(OS_MACOSX) 127 #if defined(OS_MACOSX)
128 // This really belongs in platform code, but there's no good place to
129 // initialize it between the time when the AppController is created
130 // (where there's no profile) and the time the controller gets another
131 // crack at the start of the main event loop. By that time,
132 // StartupBrowserCreator has already created the browser window, and it's too
133 // late: we need the pref to be already initialized. Doing it here also saves
134 // us from having to hard-code pref registration in the several unit tests
135 // that use this preference.
136 registry->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true);
137 registry->RegisterBooleanPref(
138 prefs::kHideFullscreenToolbar,
139 false,
140 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
141 #else
139 registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true); 142 registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true);
140 #endif 143 #endif
141 } 144 }
142 145
143 } // namespace chrome 146 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698