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

Unified Diff: chrome/browser/resources/options/import_data_overlay.js

Issue 3052022: add files (Closed)
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/import_data_overlay.js
diff --git a/chrome/browser/resources/options/import_data_overlay.js b/chrome/browser/resources/options/import_data_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..2d8c9450b4092cc14a8cf29ef312d0fe91e8d829
--- /dev/null
+++ b/chrome/browser/resources/options/import_data_overlay.js
@@ -0,0 +1,64 @@
+// 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.
+
+/**
+ * ImportDataOverlay class
+ * Encapsulated handling of the 'Import Data' overlay page.
+ * @class
+ */
+function ImportDataOverlay() {
+ OptionsPage.call(this, 'importDataOverlay',
+ templateData.import_data_title,
+ 'importDataOverlay');
+}
+
+cr.addSingletonGetter(ImportDataOverlay);
+
+ImportDataOverlay.prototype = {
+ // Inherit ImportDataOverlay from OptionsPage.
+ __proto__: OptionsPage.prototype,
+
+ /**
+ * Initialize the page.
+ */
+ initializePage: function() {
+ // Call base class implementation to starts preference initialization.
+ OptionsPage.prototype.initializePage.call(this);
+
+ $('import-data-cancel').onclick = function(e) {
+ OptionsPage.clearOverlays();
+ }
+
+ $('import-data-commit').onclick = function(e) {
+ var paramList = new Array();
+ }
+ },
+
+ /**
+ * Clear the supported browsers popup
+ * @private
+ */
+ clearSupportedBrowsers_: function() {
+ $('supported-browsers').textContent = '';
+ },
+
+ /**
+ * Update the supported browsers popup with given entries.
+ * @param {Array} list of supported browsers name.
+ */
+ updateSupportedBrowsers_: function(browsers) {
+ this.clearSupportedBrowsers_();
+ browserSelect = $('supported-browsers');
+ browserCount = browsers.length
+ for (var i = 0; i < browserCount; i++) {
+ var browser = browsers[i]
+ var option = new Option(browser['name'], browser['index']);
+ browserSelect.appendChild(option);
+ }
+ },
+};
+
+ImportDataOverlay.updateSupportedBrowsers = function(browsers) {
+ ImportDataOverlay.getInstance().updateSupportedBrowsers_(browsers);
+}
« 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