OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * StopSyncingOverlay class |
| 7 * Encapsulated handling of the 'Stop Syncing This Account' overlay page. |
| 8 * @class |
| 9 */ |
| 10 function StopSyncingOverlay() { |
| 11 OptionsPage.call(this, 'stopSyncingOverlay', |
| 12 templateData.stop_syncing_title, |
| 13 'stopSyncingOverlay'); |
| 14 } |
| 15 |
| 16 cr.addSingletonGetter(StopSyncingOverlay); |
| 17 |
| 18 StopSyncingOverlay.prototype = { |
| 19 // Inherit StopSyncingOverlay from OptionsPage. |
| 20 __proto__: OptionsPage.prototype, |
| 21 |
| 22 /** |
| 23 * Initialize the page. |
| 24 */ |
| 25 initializePage: function() { |
| 26 // Call base class implementation to starts preference initialization. |
| 27 OptionsPage.prototype.initializePage.call(this); |
| 28 |
| 29 $('stop-syncing-cancel').onclick = function(e) { |
| 30 OptionsPage.clearOverlays(); |
| 31 } |
| 32 |
| 33 $('stop-syncing-confirm').onclick = function(e) { |
| 34 chrome.send('stopSyncing'); |
| 35 OptionsPage.clearOverlays(); |
| 36 } |
| 37 } |
| 38 }; |
OLD | NEW |