Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: chrome/browser/resources/options/import_data_overlay.js

Issue 3052022: add files (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 * ImportDataOverlay class
7 * Encapsulated handling of the 'Import Data' overlay page.
8 * @class
9 */
10 function ImportDataOverlay() {
11 OptionsPage.call(this, 'importDataOverlay',
12 templateData.import_data_title,
13 'importDataOverlay');
14 }
15
16 cr.addSingletonGetter(ImportDataOverlay);
17
18 ImportDataOverlay.prototype = {
19 // Inherit ImportDataOverlay 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 $('import-data-cancel').onclick = function(e) {
30 OptionsPage.clearOverlays();
31 }
32
33 $('import-data-commit').onclick = function(e) {
34 var paramList = new Array();
35 }
36 },
37
38 /**
39 * Clear the supported browsers popup
40 * @private
41 */
42 clearSupportedBrowsers_: function() {
43 $('supported-browsers').textContent = '';
44 },
45
46 /**
47 * Update the supported browsers popup with given entries.
48 * @param {Array} list of supported browsers name.
49 */
50 updateSupportedBrowsers_: function(browsers) {
51 this.clearSupportedBrowsers_();
52 browserSelect = $('supported-browsers');
53 browserCount = browsers.length
54 for (var i = 0; i < browserCount; i++) {
55 var browser = browsers[i]
56 var option = new Option(browser['name'], browser['index']);
57 browserSelect.appendChild(option);
58 }
59 },
60 };
61
62 ImportDataOverlay.updateSupportedBrowsers = function(browsers) {
63 ImportDataOverlay.getInstance().updateSupportedBrowsers_(browsers);
64 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/import_data_overlay.html ('k') | chrome/browser/resources/options/stop_syncing_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698