cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chrome / common / extensions / api / settings_private.idl
blob41e3b8faf2db5b9b4229dd5b709cf67cd13eb859
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
3 // found in the LICENSE file.
5 // Use the <code>chrome.settingsPrivate</code> API to get or set preferences
6 // from the settings UI.
7 namespace settingsPrivate {
8 // Type of a pref.
9 enum PrefType { BOOLEAN, NUMBER, STRING, URL, LIST };
11 // Policy source of a pref.
12 enum PolicySource { DEVICE, USER };
14 // Policy enforcement of a pref.
15 enum PolicyEnforcement { ENFORCED, RECOMMENDED };
17 dictionary PrefObject {
18 // The key for the pref.
19 DOMString key;
21 // The type of the pref (e.g., boolean, string, etc.).
22 PrefType type;
24 // The current value of the pref.
25 any value;
27 // The policy source of the pref; an undefined value means there is no
28 // policy.
29 PolicySource? policySource;
31 // The policy enforcement of the pref; must be specified if policySource is
32 // also present.
33 PolicyEnforcement? policyEnforcement;
36 callback OnPrefSetCallback = void (boolean success);
37 callback GetAllPrefsCallback = void (PrefObject[] prefs);
38 callback GetPrefCallback = void (PrefObject pref);
40 interface Functions {
41 // Sets a settings value.
42 // |name|: The name of the pref.
43 // |value|: The new value of the pref.
44 // |pageId|: The user metrics identifier or null.
45 // |callback|: The callback for whether the pref was set or not.
46 static void setPref(DOMString name, any value,
47 DOMString pageId, OnPrefSetCallback callback);
49 // Gets an array of all the prefs.
50 static void getAllPrefs(GetAllPrefsCallback callback);
52 // Gets the value of a specific pref.
53 static void getPref(DOMString name, GetPrefCallback callback);
56 interface Events {
57 // Fired when a set of prefs has changed.
59 // |prefs| The prefs that changed.
60 static void onPrefsChanged(PrefObject[] prefs);