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

Side by Side Diff: chrome/browser/resources/options/automatic_settings_reset_banner.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: fixed some dbeam@'s comments 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 // Note: the native-side handler for this is AutomaticSettingsResetHandler. 5 // Note: the native-side handler for this is AutomaticSettingsResetHandler.
6 6
7 cr.define('options', function() { 7 cr.define('options', function() {
8 /** @const */ var SettingsBannerBase = options.SettingsBannerBase; 8 /** @const */ var SettingsBannerBase = options.SettingsBannerBase;
9 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 9 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }; 42 };
43 $('automatic-settings-reset-banner-activate-reset').onclick = 43 $('automatic-settings-reset-banner-activate-reset').onclick =
44 function(event) { 44 function(event) {
45 chrome.send('metricsHandler:recordAction', 45 chrome.send('metricsHandler:recordAction',
46 ['AutomaticSettingsReset_WebUIBanner_ResetClicked']); 46 ['AutomaticSettingsReset_WebUIBanner_ResetClicked']);
47 PageManager.showPageByName('resetProfileSettings'); 47 PageManager.showPageByName('resetProfileSettings');
48 }; 48 };
49 }, 49 },
50 }; 50 };
51 51
52 /**
53 * Fake declaration made for Closure Compiler. Actual method definition is
54 * in the base class.
55 * @private
56 */
57 AutomaticSettingsResetBanner.prototype.show_;
58
59 /**
60 * Fake declaration made for Closure Compiler. Actual method definition is
61 * in the base class.
62 * @private
63 */
64 AutomaticSettingsResetBanner.prototype.dismiss_;
Vitaly Pavlenko 2014/09/12 18:38:07 Moved here declarations from base class.
65
52 // Forward public APIs to private implementations. 66 // Forward public APIs to private implementations.
53 [ 67 cr.makePublic(AutomaticSettingsResetBanner, [
54 'show', 68 'show',
55 'dismiss', 69 'dismiss',
56 ].forEach(function(name) { 70 ]);
57 AutomaticSettingsResetBanner[name] = function() {
58 var instance = AutomaticSettingsResetBanner.getInstance();
59 return instance[name + '_'].apply(instance, arguments);
60 };
61 });
62 71
63 // Export 72 // Export
64 return { 73 return {
65 AutomaticSettingsResetBanner: AutomaticSettingsResetBanner 74 AutomaticSettingsResetBanner: AutomaticSettingsResetBanner
66 }; 75 };
67 }); 76 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/oobe_screen_user_image.js ('k') | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698