Chromium Code Reviews| Index: chrome/browser/resources/settings/site_settings/prefs_private_api.js |
| diff --git a/chrome/browser/resources/settings/site_settings/prefs_private_api.js b/chrome/browser/resources/settings/site_settings/prefs_private_api.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e02b2358968e301d3cbc942e88190a4555f142cb |
| --- /dev/null |
| +++ b/chrome/browser/resources/settings/site_settings/prefs_private_api.js |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2016 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. |
| + |
| +(function() { |
| +'use strict'; |
| + |
| +Polymer({ |
| + is: 'prefs-private-api', |
| + |
| + /** |
| + * Sets the default value for a site settings category. |
| + * @param {number} contentType The category to change. |
| + * @param {number} defaultValue The value to set as default. |
| + */ |
| + setDefaultValueForContentType: function(contentType, defaultValue) { |
| + chrome.send('setDefaultValueForContentType', [contentType, defaultValue]); |
| + }, |
| + |
| + /** |
| + * Gets the default value for a site settings category. |
| + * @param {number} contentType The category to change. |
| + * @return {Promise} |
| + */ |
| + getDefaultValueForContentType: function(contentType) { |
| + return cr.sendWithPromise('getDefaultValueForContentType', contentType); |
| + }, |
| +}); |
| +})(); |
|
Finnur
2016/02/16 15:41:04
At first, I had a corresponding cr singleton objec
tommycli
2016/02/17 18:18:06
After a long discussion with dpapad, we agreed tha
Finnur
2016/02/18 20:38:17
Done.
I'm fine with that, as long as this doesn't
|