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 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
8 var ArrayDataModel = cr.ui.ArrayDataModel; | 8 var ArrayDataModel = cr.ui.ArrayDataModel; |
9 | 9 |
10 /** | 10 /** |
11 * SupervisedUserImportOverlay class. | 11 * SupervisedUserImportOverlay class. |
12 * Encapsulated handling of the 'Import existing supervised user' overlay | 12 * Encapsulated handling of the 'Import existing supervised user' overlay |
13 * page. | 13 * page. |
14 * @constructor | 14 * @constructor |
15 * @extends {cr.ui.pageManager.Page} | 15 * @extends {cr.ui.pageManager.Page} |
16 */ | 16 */ |
17 function SupervisedUserImportOverlay() { | 17 function SupervisedUserImportOverlay() { |
18 var title = loadTimeData.getString('supervisedUserImportTitle'); | 18 var title = loadTimeData.getString('supervisedUserImportTitle'); |
19 Page.call(this, 'supervisedUserImport', title, 'supervised-user-import'); | 19 Page.call(this, 'supervisedUserImport', title, 'supervised-user-import'); |
20 }; | 20 } |
21 | 21 |
22 cr.addSingletonGetter(SupervisedUserImportOverlay); | 22 cr.addSingletonGetter(SupervisedUserImportOverlay); |
23 | 23 |
24 SupervisedUserImportOverlay.prototype = { | 24 SupervisedUserImportOverlay.prototype = { |
25 // Inherit from Page. | 25 // Inherit from Page. |
26 __proto__: Page.prototype, | 26 __proto__: Page.prototype, |
27 | 27 |
28 /** @override */ | 28 /** @override */ |
29 canShowPage: function() { | 29 canShowPage: function() { |
30 return !BrowserOptions.getCurrentProfile().isSupervised; | 30 return !BrowserOptions.getCurrentProfile().isSupervised; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 cr.makePublic(SupervisedUserImportOverlay, [ | 243 cr.makePublic(SupervisedUserImportOverlay, [ |
244 'onError', | 244 'onError', |
245 'onSuccess', | 245 'onSuccess', |
246 ]); | 246 ]); |
247 | 247 |
248 // Export | 248 // Export |
249 return { | 249 return { |
250 SupervisedUserImportOverlay: SupervisedUserImportOverlay, | 250 SupervisedUserImportOverlay: SupervisedUserImportOverlay, |
251 }; | 251 }; |
252 }); | 252 }); |
OLD | NEW |