OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Use the <code>chrome.settingsPrivate</code> API to get or set preferences | 5 // Use the <code>chrome.settingsPrivate</code> API to get or set preferences |
6 // from the settings UI. | 6 // from the settings UI. |
7 namespace settingsPrivate { | 7 namespace settingsPrivate { |
8 // Type of a pref. | 8 // Type of a pref. |
9 enum PrefType { BOOLEAN, NUMBER, STRING, URL, LIST, DICTIONARY }; | 9 enum PrefType { BOOLEAN, NUMBER, STRING, URL, LIST, DICTIONARY }; |
10 | 10 |
11 // Source of a restricted pref, either by policy or other source. | 11 // Source of a restricted pref, either by policy or other source. |
12 enum PolicySource { | 12 enum PolicySource { |
13 DEVICE_POLICY, | 13 DEVICE_POLICY, |
14 USER_POLICY, | 14 USER_POLICY, |
15 OWNER, | 15 OWNER, |
16 PRIMARY_USER, | 16 PRIMARY_USER, |
17 // TODO(dbeam): This is kind of confusing. Extensions can be installed by | |
18 // users or force installed by a policy (https://goo.gl/f7L5aD). Maybe we | |
19 // could rename "PolicySource" to "ControlledBy" or "EnforcementSource"? | |
stevenjb
2016/11/09 18:03:30
First off, I apologize for half completing this an
| |
17 EXTENSION | 20 EXTENSION |
18 }; | 21 }; |
19 | 22 |
20 // Enforcement type of a restricted pref. | 23 // Enforcement type of a restricted pref. |
21 enum PolicyEnforcement { ENFORCED, RECOMMENDED }; | 24 enum PolicyEnforcement { ENFORCED, RECOMMENDED }; |
22 | 25 |
23 dictionary PrefObject { | 26 dictionary PrefObject { |
24 // The key for the pref. | 27 // The key for the pref. |
25 DOMString key; | 28 DOMString key; |
26 | 29 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 double zoom, optional SetDefaultZoomCallback callback); | 88 double zoom, optional SetDefaultZoomCallback callback); |
86 }; | 89 }; |
87 | 90 |
88 interface Events { | 91 interface Events { |
89 // Fired when a set of prefs has changed. | 92 // Fired when a set of prefs has changed. |
90 // | 93 // |
91 // |prefs| The prefs that changed. | 94 // |prefs| The prefs that changed. |
92 static void onPrefsChanged(PrefObject[] prefs); | 95 static void onPrefsChanged(PrefObject[] prefs); |
93 }; | 96 }; |
94 }; | 97 }; |
OLD | NEW |