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

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

Issue 604373006: Compile chrome://settings, part 9: yet another final battle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@K_blockers_from_bookmarks
Patch Set: describe supressions Created 6 years, 2 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
11 /** 11 /**
12 * AutomaticSettingsResetBanner class 12 * AutomaticSettingsResetBanner class
13 * Provides encapsulated handling of the Reset Profile Settings banner. 13 * Provides encapsulated handling of the Reset Profile Settings banner.
14 * @constructor 14 * @constructor
15 * @extends {options.SettingsBannerBase} 15 * @extends {options.SettingsBannerBase}
16 */ 16 */
17 function AutomaticSettingsResetBanner() {} 17 function AutomaticSettingsResetBanner() {}
18 18
19 cr.addSingletonGetter(AutomaticSettingsResetBanner); 19 cr.addSingletonGetter(AutomaticSettingsResetBanner);
20 20
21 AutomaticSettingsResetBanner.prototype = { 21 AutomaticSettingsResetBanner.prototype = {
22 __proto__: SettingsBannerBase.prototype, 22 __proto__: SettingsBannerBase.prototype,
23 23
24 /** 24 /**
25 * Initializes the banner's event handlers. 25 * Initializes the banner's event handlers.
26 * @suppress {checkTypes}
27 * TODO(vitalyp): remove the suppression. Suppression is needed because
28 * method dismiss() is attached to AutomaticSettingsResetBanner at run-time
29 * via "Forward public APIs to protected implementations" pattern (see
30 * below). Currently the compiler pass and cr.js handles only forwarding to
31 * private implementations using cr.makePublic().
26 */ 32 */
27 initialize: function() { 33 initialize: function() {
28 this.showMetricName = 'AutomaticSettingsReset_WebUIBanner_BannerShown'; 34 this.showMetricName = 'AutomaticSettingsReset_WebUIBanner_BannerShown';
29 35
30 this.dismissNativeCallbackName = 36 this.dismissNativeCallbackName =
31 'onDismissedAutomaticSettingsResetBanner'; 37 'onDismissedAutomaticSettingsResetBanner';
32 38
33 this.visibilityDomElement = $('automatic-settings-reset-banner'); 39 this.visibilityDomElement = $('automatic-settings-reset-banner');
34 40
35 $('automatic-settings-reset-banner-close').onclick = function(event) { 41 $('automatic-settings-reset-banner-close').onclick = function(event) {
(...skipping 23 matching lines...) Expand all
59 var instance = AutomaticSettingsResetBanner.getInstance(); 65 var instance = AutomaticSettingsResetBanner.getInstance();
60 return instance[name].apply(instance, arguments); 66 return instance[name].apply(instance, arguments);
61 }; 67 };
62 }); 68 });
63 69
64 // Export 70 // Export
65 return { 71 return {
66 AutomaticSettingsResetBanner: AutomaticSettingsResetBanner 72 AutomaticSettingsResetBanner: AutomaticSettingsResetBanner
67 }; 73 };
68 }); 74 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/alert_overlay.js ('k') | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698