Index: chrome/browser/resources/settings/settings_private_proto.js |
diff --git a/chrome/browser/resources/settings/settings_private_proto.js b/chrome/browser/resources/settings/settings_private_proto.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e81a60787fed4195fb0dd8a82292d852fd3c44c3 |
--- /dev/null |
+++ b/chrome/browser/resources/settings/settings_private_proto.js |
@@ -0,0 +1,62 @@ |
+/* Copyright 2015 The Chromium Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. */ |
+ |
+/** @fileoverview Provides an interface for that can be overridden in tests. */ |
+ |
+assertNotReached('Proto file should not be executed.'); |
Dan Beam
2015/11/20 02:16:06
what is a proto file?
michaelpg
2015/11/21 23:03:50
renamed to interface.
Dan Beam
2015/11/23 18:56:09
you should probably keep the file name and class n
|
+ |
+/** @interface */ |
+function SettingsPrivate() {} |
+ |
+SettingsPrivate.prototype = { |
+ |
Dan Beam
2015/11/20 02:18:20
nit: remove \n
michaelpg
2015/11/21 23:03:50
Done.
|
+ /** |
+ * Sets a settings value. |
+ * @param {string} name The name of the pref. |
+ * @param {*} value The new value of the pref. |
+ * @param {string} pageId The user metrics identifier or null. |
+ * @param {function(boolean):void} callback The callback for whether the pref |
+ * was set or not. |
+ * @see https://developer.chrome.com/extensions/settingsPrivate#method-setPref |
+ */ |
+ setPref: assertNotReached, |
michaelpg
2015/11/20 00:51:06
this is weird, why is closure OK with a named func
Dan Beam
2015/11/20 01:58:17
because we have magic to identify "assertNotReache
michaelpg
2015/11/21 23:03:50
Acknowledged.
|
+ |
+ /** |
+ * Gets an array of all the prefs. |
+ * @param {function(!Array<!chrome.settingsPrivate.PrefObject>):void} callback |
+ * @see https://developer.chrome.com/extensions/settingsPrivate#method-getAllPrefs |
+ */ |
+ getAllPrefs: assertNotReached, |
+ |
+ /** |
+ * Gets the value of a specific pref. |
+ * @param {string} name |
+ * @param {function(!chrome.settingsPrivate.PrefObject):void} callback |
+ * @see https://developer.chrome.com/extensions/settingsPrivate#method-getPref |
+ */ |
+ getPref: assertNotReached, |
+ |
+ /** |
+ * Gets the page zoom factor as an integer percentage. |
+ * @param {function(number):void} callback |
+ * @see https://developer.chrome.com/extensions/settingsPrivate#method-getDefaultZoomPercent |
+ */ |
+ getDefaultZoomPercent: assertNotReached, |
+ |
+ /** |
+ * Sets the page zoom factor from a zoom percentage. |
+ * @param {number} percent |
+ * @param {function(boolean):void=} callback |
+ * @see https://developer.chrome.com/extensions/settingsPrivate#method-setDefaultZoomPercent |
+ */ |
+ setDefaultZoomPercent: assertNotReached, |
+ |
+ /** |
+ * <p>Fired when a set of prefs has changed.</p><p>|prefs| The prefs that |
+ * changed.</p> |
+ * @type {!ChromeEvent} |
+ * @see https://developer.chrome.com/extensions/settingsPrivate#event-onPrefsChanged |
+ */ |
+ onPrefsChanged: new ChromeEvent(), |
+}; |