Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 9 |
| 10 /** | 10 /** |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 | 32 |
| 33 $('automatic-settings-reset-banner-close').onclick = function(event) { | 33 $('automatic-settings-reset-banner-close').onclick = function(event) { |
| 34 chrome.send('metricsHandler:recordAction', | 34 chrome.send('metricsHandler:recordAction', |
| 35 ['AutomaticSettingsReset_WebUIBanner_ManuallyClosed']); | 35 ['AutomaticSettingsReset_WebUIBanner_ManuallyClosed']); |
| 36 AutomaticSettingsResetBanner.dismiss(); | 36 AutomaticSettingsResetBanner.dismiss(); |
| 37 }; | 37 }; |
| 38 $('automatic-settings-reset-learn-more').onclick = function(event) { | 38 $('automatic-settings-reset-learn-more').onclick = function(event) { |
| 39 chrome.send('metricsHandler:recordAction', | 39 chrome.send('metricsHandler:recordAction', |
| 40 ['AutomaticSettingsReset_WebUIBanner_LearnMoreClicked']); | 40 ['AutomaticSettingsReset_WebUIBanner_LearnMoreClicked']); |
| 41 }; | 41 }; |
| 42 $('automatic-settings-reset-banner-activate-reset').onclick = | |
| 43 function(event) { | |
| 44 chrome.send('metricsHandler:recordAction', | |
| 45 ['AutomaticSettingsReset_WebUIBanner_ResetClicked']); | |
| 46 OptionsPage.navigateToPage('resetProfileSettings'); | |
| 47 }; | |
|
robertshield
2014/07/28 21:09:42
not sure, but seems like this should line up with
gab
2014/07/28 21:22:52
Wasn't sure either but since I indented "function(
Bernhard Bauer
2014/07/28 22:29:38
I think what you do here is indent line 43 four sp
gab
2014/07/29 14:54:40
Okay so just like I have it, but bring the closing
Bernhard Bauer
2014/07/29 15:01:43
Sorry, what I meant was this:
$('foo').onclick =
gab
2014/07/29 15:41:55
Ah I see, thanks for clarifying, done!
| |
| 42 }, | 48 }, |
| 43 }; | 49 }; |
| 44 | 50 |
| 45 // Forward public APIs to private implementations. | 51 // Forward public APIs to private implementations. |
| 46 [ | 52 [ |
| 47 'show', | 53 'show', |
| 48 'dismiss', | 54 'dismiss', |
| 49 ].forEach(function(name) { | 55 ].forEach(function(name) { |
| 50 AutomaticSettingsResetBanner[name] = function() { | 56 AutomaticSettingsResetBanner[name] = function() { |
| 51 var instance = AutomaticSettingsResetBanner.getInstance(); | 57 var instance = AutomaticSettingsResetBanner.getInstance(); |
| 52 return instance[name + '_'].apply(instance, arguments); | 58 return instance[name + '_'].apply(instance, arguments); |
| 53 }; | 59 }; |
| 54 }); | 60 }); |
| 55 | 61 |
| 56 // Export | 62 // Export |
| 57 return { | 63 return { |
| 58 AutomaticSettingsResetBanner: AutomaticSettingsResetBanner | 64 AutomaticSettingsResetBanner: AutomaticSettingsResetBanner |
| 59 }; | 65 }; |
| 60 }); | 66 }); |
| OLD | NEW |