Chromium Code Reviews| Index: chrome/browser/resources/options/settings_banner.js |
| diff --git a/chrome/browser/resources/options/settings_banner.js b/chrome/browser/resources/options/settings_banner.js |
| index dc96c08b864a10de2ad538e5331c4d8e3f4b4dde..895acee785c9f821fcfbb4421216c010df68cc8e 100644 |
| --- a/chrome/browser/resources/options/settings_banner.js |
| +++ b/chrome/browser/resources/options/settings_banner.js |
| @@ -2,9 +2,6 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// TODO(engedy): AutomaticSettingsResetBanner is the sole class to derive from |
| -// SettingsBannerBase. Refactor this into automatic_settings_reset_banner.js. |
| - |
| cr.define('options', function() { |
| /** |
| @@ -35,26 +32,29 @@ cr.define('options', function() { |
| /** |
| * Metric name to send when a show event occurs. |
| + * @protected |
| */ |
| - showMetricName_: '', |
| + showMetricName: '', |
| /** |
| * Name of the native callback invoked when the banner is dismised. |
| + * @protected |
| */ |
| - dismissNativeCallbackName_: '', |
| + dismissNativeCallbackName: '', |
| /** |
| * DOM element whose visibility is set when setVisibility_ is called. |
| + * @protected |
| */ |
| - setVisibilibyDomElement_: null, |
| + setVisibilityDomElement: null, |
|
Dan Beam
2014/09/10 19:13:37
nit: visibilityDomElement (prefixing with "set" de
engedy
2014/09/11 11:51:14
Done, renamed 4 occurrences.
|
| /** |
| * Called by the native code to show the banner if needed. |
| - * @private |
| + * @protected |
| */ |
| - show_: function() { |
| + show: function() { |
| if (!this.hadBeenDismissed_) { |
| - chrome.send('metricsHandler:recordAction', [this.showMetricName_]); |
| + chrome.send('metricsHandler:recordAction', [this.showMetricName]); |
| this.setVisibility_(true); |
| } |
| }, |
| @@ -63,10 +63,10 @@ cr.define('options', function() { |
| * Called when the banner should be closed as a result of something taking |
| * place on the WebUI page, i.e. when its close button is pressed, or when |
| * the confirmation dialog for the profile settings reset feature is opened. |
| - * @private |
| + * @protected |
| */ |
| - dismiss_: function() { |
| - chrome.send(this.dismissNativeCallbackName_); |
| + dismiss: function() { |
| + chrome.send(this.dismissNativeCallbackName); |
| this.hadBeenDismissed_ = true; |
| this.setVisibility_(false); |
| }, |
| @@ -77,7 +77,7 @@ cr.define('options', function() { |
| * @private |
| */ |
| setVisibility_: function(show) { |
| - this.setVisibilibyDomElement_.hidden = !show; |
| + this.setVisibilityDomElement.hidden = !show; |
| }, |
| }; |