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

Side by Side Diff: chrome/browser/resources/options/supervised_user_list_data.js

Issue 557633002: Add public API generation with cr.makePublic() and handle it in compiler pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@H_options_errors_3
Patch Set: fix bug with oobe Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** 6 /**
7 * SupervisedUserListData class. 7 * SupervisedUserListData class.
8 * Handles requests for retrieving a list of existing supervised users which 8 * Handles requests for retrieving a list of existing supervised users which
9 * are supervised by the current profile. For each request a promise is 9 * are supervised by the current profile. For each request a promise is
10 * returned, which is cached in order to reuse the retrieved supervised users 10 * returned, which is cached in order to reuse the retrieved supervised users
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 SupervisedUserListData.prototype.removeObserver_ = function(observer) { 127 SupervisedUserListData.prototype.removeObserver_ = function(observer) {
128 for (var i = 0; i < this.observers_.length; ++i) { 128 for (var i = 0; i < this.observers_.length; ++i) {
129 if (this.observers_[i] == observer) { 129 if (this.observers_[i] == observer) {
130 this.observers_.splice(i, 1); 130 this.observers_.splice(i, 1);
131 return; 131 return;
132 } 132 }
133 } 133 }
134 }; 134 };
135 135
136 // Forward public APIs to private implementations. 136 // Forward public APIs to private implementations.
137 [ 137 cr.makePublic(SupervisedUserListData, [
138 'addObserver', 138 'addObserver',
139 'onSigninError', 139 'onSigninError',
140 'receiveExistingSupervisedUsers', 140 'receiveExistingSupervisedUsers',
141 'removeObserver', 141 'removeObserver',
142 'requestExistingSupervisedUsers', 142 'requestExistingSupervisedUsers',
143 'resetPromise', 143 'resetPromise',
144 ].forEach(function(name) { 144 ]);
145 SupervisedUserListData[name] = function() {
146 var instance = SupervisedUserListData.getInstance();
147 return instance[name + '_'].apply(instance, arguments);
148 };
149 });
150 145
151 // Export 146 // Export
152 return { 147 return {
153 SupervisedUserListData: SupervisedUserListData, 148 SupervisedUserListData: SupervisedUserListData,
154 }; 149 };
155 }); 150 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/supervised_user_import.js ('k') | third_party/closure_compiler/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698