OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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('sync_promo', function() { | 5 cr.define('sync_promo', function() { |
6 /** | 6 /** |
7 * SyncPromo class | 7 * SyncPromo class |
8 * Subclass of options.SyncSetupOverlay that customizes the sync setup | 8 * Subclass of options.SyncSetupOverlay that customizes the sync setup |
9 * overlay for use in the new tab page. | 9 * overlay for use in the new tab page. |
10 * @class | 10 * @class |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 initializePage: function() { | 52 initializePage: function() { |
53 localStrings = new LocalStrings(); | 53 localStrings = new LocalStrings(); |
54 | 54 |
55 options.SyncSetupOverlay.prototype.initializePage.call(this); | 55 options.SyncSetupOverlay.prototype.initializePage.call(this); |
56 | 56 |
57 // Hide parts of the login UI and show the promo UI. | 57 // Hide parts of the login UI and show the promo UI. |
58 this.hideOuterLoginUI_(); | 58 this.hideOuterLoginUI_(); |
59 $('sync-setup-login-promo-column').hidden = false; | 59 $('sync-setup-login-promo-column').hidden = false; |
60 $('promo-skip').hidden = false; | 60 $('promo-skip').hidden = false; |
61 | 61 |
| 62 this.showSetupUI_(); |
62 chrome.send('SyncPromo:Initialize'); | 63 chrome.send('SyncPromo:Initialize'); |
63 | 64 |
64 var self = this; | 65 var self = this; |
65 | 66 |
66 $('promo-skip-button').addEventListener('click', function() { | 67 $('promo-skip-button').addEventListener('click', function() { |
67 chrome.send('SyncPromo:UserFlowAction', [actions.SKIP_CLICKED]); | 68 chrome.send('SyncPromo:UserFlowAction', [actions.SKIP_CLICKED]); |
68 self.closeOverlay_(); | 69 self.closeOverlay_(); |
69 }); | 70 }); |
70 | 71 |
71 var learnMoreClickedAlready = false; | 72 var learnMoreClickedAlready = false; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 227 |
227 // Export | 228 // Export |
228 return { | 229 return { |
229 SyncPromo : SyncPromo | 230 SyncPromo : SyncPromo |
230 }; | 231 }; |
231 }); | 232 }); |
232 | 233 |
233 var OptionsPage = options.OptionsPage; | 234 var OptionsPage = options.OptionsPage; |
234 var SyncSetupOverlay = sync_promo.SyncPromo; | 235 var SyncSetupOverlay = sync_promo.SyncPromo; |
235 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize); | 236 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize); |
OLD | NEW |