| 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 }; | 9 enum PrefType { BOOLEAN, NUMBER, STRING, URL, LIST }; |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Gets an array of all the prefs. | 49 // Gets an array of all the prefs. |
| 50 static void getAllPrefs(GetAllPrefsCallback callback); | 50 static void getAllPrefs(GetAllPrefsCallback callback); |
| 51 | 51 |
| 52 // Gets the value of a specific pref. | 52 // Gets the value of a specific pref. |
| 53 static void getPref(DOMString name, GetPrefCallback callback); | 53 static void getPref(DOMString name, GetPrefCallback callback); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 interface Events { | 56 interface Events { |
| 57 // Fired when a set of prefs has changed. | 57 // Fired when a set of prefs has changed. |
| 58 // | 58 // |
| 59 // |callback|: Callback fired with a list of prefs that changed. | 59 // |prefs| The prefs that changed. |
| 60 static void onPrefsChanged(GetAllPrefsCallback callback); | 60 static void onPrefsChanged(PrefObject[] prefs); |
| 61 }; | 61 }; |
| 62 }; | 62 }; |
| OLD | NEW |