blob: c87e9223328243cecb0ef865098a49127a605d5c (
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
|
// Copyright (c) 2012 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 SettingsDialog = options.SettingsDialog;
/*
* InstantConfirmOverlay class
* Dialog to confirm that the user really wants to enable Chrome Instant.
* @extends {SettingsDialog}
*/
function InstantConfirmOverlay() {
SettingsDialog.call(this,
'instantConfirm',
templateData.instantConfirmTitle,
'instantConfirmOverlay',
$('instantConfirmOk'),
$('instantConfirmCancel'));
};
cr.addSingletonGetter(InstantConfirmOverlay);
InstantConfirmOverlay.prototype = {
__proto__: SettingsDialog.prototype,
/** @inheritDoc */
initializePage: function() {
SettingsDialog.prototype.initializePage.call(this);
},
/** @inheritDoc */
handleConfirm: function() {
SettingsDialog.prototype.handleConfirm.call(this);
chrome.send('enableInstant');
},
/** @inheritDoc */
handleCancel: function() {
SettingsDialog.prototype.handleCancel.call(this);
$('instant-enabled-control').checked = false;
},
};
// Export
return {
InstantConfirmOverlay: InstantConfirmOverlay
};
});
|