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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2110663007: Settings: Fix some BrowserProxy compile issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix type definition Created 4 years, 5 months 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_settings_behavior.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 5 /**
6 * @fileoverview A helper object used from the "Site Settings" section to 6 * @fileoverview A helper object used from the "Site Settings" section to
7 * interact with the content settings prefs. 7 * interact with the content settings prefs.
8 */ 8 */
9 9
10 /** 10 /**
(...skipping 29 matching lines...) Expand all
40 */ 40 */
41 var MediaPickerEntry; 41 var MediaPickerEntry;
42 42
43 cr.define('settings', function() { 43 cr.define('settings', function() {
44 /** @interface */ 44 /** @interface */
45 function SiteSettingsPrefsBrowserProxy() {} 45 function SiteSettingsPrefsBrowserProxy() {}
46 46
47 SiteSettingsPrefsBrowserProxy.prototype = { 47 SiteSettingsPrefsBrowserProxy.prototype = {
48 /** 48 /**
49 * Sets the default value for a site settings category. 49 * Sets the default value for a site settings category.
50 * @param {number} contentType The category to change. 50 * @param {string} contentType The name of the category to change.
51 * @param {number} defaultValue The value to set as default. 51 * @param {string} defaultValue The name of the value to set as default.
52 */ 52 */
53 setDefaultValueForContentType: function(contentType, defaultValue) {}, 53 setDefaultValueForContentType: function(contentType, defaultValue) {},
54 54
55 /** 55 /**
56 * Gets the default value for a site settings category. 56 * Gets the default value for a site settings category.
57 * @param {number} contentType The category to change. 57 * @param {string} contentType The name of the category to query.
58 * @return {Promise<boolean>} 58 * @return {Promise<boolean>}
59 */ 59 */
60 getDefaultValueForContentType: function(contentType) {}, 60 getDefaultValueForContentType: function(contentType) {},
61 61
62 /** 62 /**
63 * Gets the exceptions (site list) for a particular category. 63 * Gets the exceptions (site list) for a particular category.
64 * @param {number} contentType The category to change. 64 * @param {string} contentType The name of the category to query.
65 * @return {Promise<Array<SiteException>>} 65 * @return {Promise<Array<SiteException>>}
66 */ 66 */
67 getExceptionList: function(contentType) {}, 67 getExceptionList: function(contentType) {},
68 68
69 /** 69 /**
70 * Resets the category permission for a given origin (expressed as primary 70 * Resets the category permission for a given origin (expressed as primary
71 * and secondary patterns). 71 * and secondary patterns).
72 * @param {string} primaryPattern The origin to change (primary pattern). 72 * @param {string} primaryPattern The origin to change (primary pattern).
73 * @param {string} secondaryPattern The embedding origin to change 73 * @param {string} secondaryPattern The embedding origin to change
74 * (secondary pattern). 74 * (secondary pattern).
75 * @param {number} contentType The category to change. 75 * @param {string} contentType The name of the category to reset.
76 */ 76 */
77 resetCategoryPermissionForOrigin: function( 77 resetCategoryPermissionForOrigin: function(
78 primaryPattern, secondaryPattern, contentType) {}, 78 primaryPattern, secondaryPattern, contentType) {},
79 79
80 /** 80 /**
81 * Sets the category permission for a given origin (expressed as primary 81 * Sets the category permission for a given origin (expressed as primary
82 * and secondary patterns). 82 * and secondary patterns).
83 * @param {string} primaryPattern The origin to change (primary pattern). 83 * @param {string} primaryPattern The origin to change (primary pattern).
84 * @param {string} secondaryPattern The embedding origin to change 84 * @param {string} secondaryPattern The embedding origin to change
85 * (secondary pattern). 85 * (secondary pattern).
86 * @param {number} contentType The category to change. 86 * @param {string} contentType The name of the category to change.
87 * @param {string} value The value to change the permission to. 87 * @param {string} value The value to change the permission to.
88 */ 88 */
89 setCategoryPermissionForOrigin: function( 89 setCategoryPermissionForOrigin: function(
90 primaryPattern, secondaryPattern, contentType, value) {}, 90 primaryPattern, secondaryPattern, contentType, value) {},
91 91
92 /** 92 /**
93 * Checks whether a pattern is valid. 93 * Checks whether a pattern is valid.
94 * @param {string} pattern The pattern to check 94 * @param {string} pattern The pattern to check
95 * @return {!Promise<boolean>} True if the pattern is valid. 95 * @return {!Promise<boolean>} True if the pattern is valid.
96 */ 96 */
97 isPatternValid: function(pattern) {}, 97 isPatternValid: function(pattern) {},
98 98
99 /** 99 /**
100 * Gets the list of default capture devices for a given type of media. List 100 * Gets the list of default capture devices for a given type of media. List
101 * is returned through a JS call to updateDevicesMenu. 101 * is returned through a JS call to updateDevicesMenu.
102 * @param {string} type The type to look up. 102 * @param {string} type The type to look up.
103 */ 103 */
104 getDefaultCaptureDevices: function(type) {}, 104 getDefaultCaptureDevices: function(type) {},
105 105
106 /** 106 /**
107 * Sets a default devices for a given type of media. 107 * Sets a default devices for a given type of media.
108 * @param {string} type The type of media to configure. 108 * @param {string} type The type of media to configure.
109 * @param {string} defaultValue The id of the media device to set. 109 * @param {string} defaultValue The id of the media device to set.
110 */ 110 */
111 setDefaultCaptureDevice: function(type, defaultValue) {}, 111 setDefaultCaptureDevice: function(type, defaultValue) {},
112 }; 112 };
113 113
114 /** 114 /**
115 * @constructor 115 * @constructor
116 * @implements {SiteSettingsPrefsBrowserProxy} 116 * @implements {settings.SiteSettingsPrefsBrowserProxy}
117 */ 117 */
118 function SiteSettingsPrefsBrowserProxyImpl() {} 118 function SiteSettingsPrefsBrowserProxyImpl() {}
119 119
120 // The singleton instance_ is replaced with a test version of this wrapper 120 // The singleton instance_ is replaced with a test version of this wrapper
121 // during testing. 121 // during testing.
122 cr.addSingletonGetter(SiteSettingsPrefsBrowserProxyImpl); 122 cr.addSingletonGetter(SiteSettingsPrefsBrowserProxyImpl);
123 123
124 SiteSettingsPrefsBrowserProxyImpl.prototype = { 124 SiteSettingsPrefsBrowserProxyImpl.prototype = {
125 /** @override */ 125 /** @override */
126 setDefaultValueForContentType: function(contentType, defaultValue) { 126 setDefaultValueForContentType: function(contentType, defaultValue) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 chrome.send('getDefaultCaptureDevices', [type]); 161 chrome.send('getDefaultCaptureDevices', [type]);
162 }, 162 },
163 163
164 /** @override */ 164 /** @override */
165 setDefaultCaptureDevice: function(type, defaultValue) { 165 setDefaultCaptureDevice: function(type, defaultValue) {
166 chrome.send('setDefaultCaptureDevice', [type, defaultValue]); 166 chrome.send('setDefaultCaptureDevice', [type, defaultValue]);
167 }, 167 },
168 }; 168 };
169 169
170 return { 170 return {
171 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy,
171 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, 172 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl,
172 }; 173 };
173 }); 174 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_settings_behavior.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698