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