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

Side by Side Diff: chrome/browser/resources/settings/settings_private_proto.js

Issue 1447103002: MD Settings: FakeSettingsPrivate for tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change how fake is set Created 5 years, 1 month 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
OLDNEW
(Empty)
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. */
4
5 /** @fileoverview Provides an interface for that can be overridden in tests. */
6
7 assertNotReached('Proto file should not be executed.');
8
9 /** @interface */
10 function SettingsPrivate() {}
11
12 SettingsPrivate.prototype = {
13
14 /**
15 * Sets a settings value.
16 * @param {string} name The name of the pref.
17 * @param {*} value The new value of the pref.
18 * @param {string} pageId The user metrics identifier or null.
19 * @param {function(boolean):void} callback The callback for whether the pref
20 * was set or not.
21 * @see https://developer.chrome.com/extensions/settingsPrivate#method-setPref
22 */
23 setPref: function(name, value, pageId, callback) {},
24
25 /**
26 * Gets an array of all the prefs.
27 * @param {function(!Array<!chrome.settingsPrivate.PrefObject>):void} callback
28 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getAllP refs
29 */
30 getAllPrefs: function(callback) {},
31
32 /**
33 * Gets the value of a specific pref.
34 * @param {string} name
35 * @param {function(!chrome.settingsPrivate.PrefObject):void} callback
36 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getPref
37 */
38 getPref: function(name, callback) {},
39
40 /**
41 * Gets the page zoom factor as an integer percentage.
42 * @param {function(number):void} callback
43 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getDefa ultZoomPercent
44 */
45 getDefaultZoomPercent: function(callback) {},
46
47 /**
48 * Sets the page zoom factor from a zoom percentage.
49 * @param {number} percent
50 * @param {function(boolean):void=} callback
51 * @see https://developer.chrome.com/extensions/settingsPrivate#method-setDefa ultZoomPercent
52 */
53 setDefaultZoomPercent: function(percent, callback) {},
54
55 /**
56 * <p>Fired when a set of prefs has changed.</p><p>|prefs| The prefs that
57 * changed.</p>
58 * @type {!ChromeEvent}
59 * @see https://developer.chrome.com/extensions/settingsPrivate#event-onPrefsC hanged
60 */
61 onPrefsChanged: new ChromeEvent(),
62 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698