OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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('options', function() { | 5 cr.define('options', function() { |
6 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
7 /** @const */ var SettingsDialog = options.SettingsDialog; | 7 /** @const */ var SettingsDialog = options.SettingsDialog; |
8 | 8 |
9 /** | 9 /** |
10 * HomePageOverlay class | 10 * HomePageOverlay class |
11 * Dialog that allows users to set the home page. | 11 * Dialog that allows users to set the home page. |
12 * @extends {SettingsDialog} | 12 * @extends {SettingsDialog} |
13 */ | 13 */ |
14 function ThirdPartyImeConfirmOverlay() { | 14 function ThirdPartyImeConfirmOverlay() { |
15 SettingsDialog.call( | 15 SettingsDialog.call( |
16 this, 'thirdPartyImeConfirm', | 16 this, 'thirdPartyImeConfirm', |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 * @param {{extension: string, confirm: Function, cancel: Function}} data | 61 * @param {{extension: string, confirm: Function, cancel: Function}} data |
62 * Options for the confirmation dialog. | 62 * Options for the confirmation dialog. |
63 * @private | 63 * @private |
64 */ | 64 */ |
65 showConfirmationDialog_: function(data) { | 65 showConfirmationDialog_: function(data) { |
66 this.confirmationCallback_ = data.confirm; | 66 this.confirmationCallback_ = data.confirm; |
67 this.cancellationCallback_ = data.cancel; | 67 this.cancellationCallback_ = data.cancel; |
68 var message = loadTimeData.getStringF('thirdPartyImeConfirmMessage', | 68 var message = loadTimeData.getStringF('thirdPartyImeConfirmMessage', |
69 data.extension); | 69 data.extension); |
70 $('third-party-ime-confirm-text').textContent = message; | 70 $('third-party-ime-confirm-text').textContent = message; |
71 OptionsPage.showPageByName(this.name, false); | 71 PageManager.showPageByName(this.name, false); |
72 }, | 72 }, |
73 }; | 73 }; |
74 | 74 |
75 /** | 75 /** |
76 * Displays a confirmation dialog indicating the risk fo enabling | 76 * Displays a confirmation dialog indicating the risk fo enabling |
77 * a third party IME. | 77 * a third party IME. |
78 * @param {{extension: string, confirm: Function, cancel: Function}} data | 78 * @param {{extension: string, confirm: Function, cancel: Function}} data |
79 * Options for the confirmation dialog. | 79 * Options for the confirmation dialog. |
80 */ | 80 */ |
81 ThirdPartyImeConfirmOverlay.showConfirmationDialog = function(data) { | 81 ThirdPartyImeConfirmOverlay.showConfirmationDialog = function(data) { |
82 ThirdPartyImeConfirmOverlay.getInstance().showConfirmationDialog_(data); | 82 ThirdPartyImeConfirmOverlay.getInstance().showConfirmationDialog_(data); |
83 }; | 83 }; |
84 | 84 |
85 // Export | 85 // Export |
86 return { | 86 return { |
87 ThirdPartyImeConfirmOverlay: ThirdPartyImeConfirmOverlay | 87 ThirdPartyImeConfirmOverlay: ThirdPartyImeConfirmOverlay |
88 }; | 88 }; |
89 }); | 89 }); |
OLD | NEW |