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

Side by Side Diff: chrome/browser/resources/options/chromeos/change_picture_options.js

Issue 577843003: Revert of 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: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 var UserImagesGrid = options.UserImagesGrid; 8 var UserImagesGrid = options.UserImagesGrid;
9 var ButtonImages = UserImagesGrid.ButtonImages; 9 var ButtonImages = UserImagesGrid.ButtonImages;
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 for (var i = 0, data; data = imagesData[i]; i++) { 317 for (var i = 0, data; data = imagesData[i]; i++) {
318 var item = imageGrid.addItem(data.url, data.title); 318 var item = imageGrid.addItem(data.url, data.title);
319 item.type = 'default'; 319 item.type = 'default';
320 item.author = data.author || ''; 320 item.author = data.author || '';
321 item.website = data.website || ''; 321 item.website = data.website || '';
322 } 322 }
323 }, 323 },
324 }; 324 };
325 325
326 // Forward public APIs to private implementations. 326 // Forward public APIs to private implementations.
327 cr.makePublic(ChangePictureOptions, [ 327 [
328 'closeOverlay', 328 'closeOverlay',
329 'setCameraPresent', 329 'setCameraPresent',
330 'setDefaultImages', 330 'setDefaultImages',
331 'setOldImage', 331 'setOldImage',
332 'setProfileImage', 332 'setProfileImage',
333 'setSelectedImage', 333 'setSelectedImage',
334 ]); 334 ].forEach(function(name) {
335 ChangePictureOptions[name] = function() {
336 var instance = ChangePictureOptions.getInstance();
337 return instance[name + '_'].apply(instance, arguments);
338 };
339 });
335 340
336 // Export 341 // Export
337 return { 342 return {
338 ChangePictureOptions: ChangePictureOptions 343 ChangePictureOptions: ChangePictureOptions
339 }; 344 };
340 345
341 }); 346 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/resources/options/chromeos/keyboard_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698