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 // TODO(sail): Refactor options_page and remove this include. | 5 // TODO(sail): Refactor options_page and remove this include. |
6 <include src="options/options_page.js"/> | 6 <include src="options/options_page.js"/> |
7 <include src="sync_setup_overlay.js"/> | 7 <include src="sync_setup_overlay.js"/> |
8 | 8 |
9 cr.define('sync_promo', function() { | 9 cr.define('sync_promo', function() { |
10 /** | 10 /** |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 }; | 268 }; |
269 | 269 |
270 SyncPromo.setPromoTitleVisible = function(visible) { | 270 SyncPromo.setPromoTitleVisible = function(visible) { |
271 SyncPromo.getInstance().setPromoTitleVisible_(visible); | 271 SyncPromo.getInstance().setPromoTitleVisible_(visible); |
272 }; | 272 }; |
273 | 273 |
274 SyncPromo.recordPageViewActions = function() { | 274 SyncPromo.recordPageViewActions = function() { |
275 SyncPromo.getInstance().recordPageViewActions_(); | 275 SyncPromo.getInstance().recordPageViewActions_(); |
276 }; | 276 }; |
277 | 277 |
| 278 SyncPromo.populatePromoMessage = function(resName) { |
| 279 SyncPromo.getInstance().populatePromoMessage_(resName); |
| 280 }; |
| 281 |
278 // Export | 282 // Export |
279 return { | 283 return { |
280 SyncPromo: SyncPromo | 284 SyncPromo: SyncPromo |
281 }; | 285 }; |
282 }); | 286 }); |
283 | 287 |
284 var OptionsPage = options.OptionsPage; | 288 var OptionsPage = options.OptionsPage; |
285 var SyncSetupOverlay = sync_promo.SyncPromo; | 289 var SyncSetupOverlay = sync_promo.SyncPromo; |
286 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize); | 290 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize); |
287 window.addEventListener('beforeunload', | 291 window.addEventListener('beforeunload', |
288 sync_promo.SyncPromo.recordPageViewActions.bind(sync_promo.SyncPromo)); | 292 sync_promo.SyncPromo.recordPageViewActions.bind(sync_promo.SyncPromo)); |
OLD | NEW |