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

Unified Diff: chrome/browser/resources/options2/settings_dialog.js

Issue 10809005: Options: Rename chrome/browser/resources/options2 -> chrome/browser/resources/options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options2/settings_dialog.js
diff --git a/chrome/browser/resources/options2/settings_dialog.js b/chrome/browser/resources/options2/settings_dialog.js
deleted file mode 100644
index 609bbaaa9df11e63cff4d9263149850f167d7b2b..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/options2/settings_dialog.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// 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.
-
-/**
- * @fileoverview Base class for dialogs that require saving preferences on
- * confirm and resetting preference inputs on cancel.
- */
-
-cr.define('options', function() {
- /** @const */ var OptionsPage = options.OptionsPage;
-
- /**
- * Base class for settings dialogs.
- * @constructor
- * @param {string} name See OptionsPage constructor.
- * @param {string} title See OptionsPage constructor.
- * @param {string} pageDivName See OptionsPage constructor.
- * @param {HTMLInputElement} okButton The confirmation button element.
- * @param {HTMLInputElement} cancelButton The cancellation button element.
- * @extends {OptionsPage}
- */
- function SettingsDialog(name, title, pageDivName, okButton, cancelButton) {
- OptionsPage.call(this, name, title, pageDivName);
- this.okButton = okButton;
- this.cancelButton = cancelButton;
- }
-
- SettingsDialog.prototype = {
- __proto__: OptionsPage.prototype,
-
- /**
- * @inheritDoc
- */
- initializePage: function() {
- this.okButton.onclick = this.handleConfirm.bind(this);
- this.cancelButton.onclick = this.handleCancel.bind(this);
- },
-
- /**
- * Handles the confirm button by saving the dialog preferences.
- */
- handleConfirm: function() {
- OptionsPage.closeOverlay();
-
- var els = this.pageDiv.querySelectorAll('[dialog-pref]');
- for (var i = 0; i < els.length; i++) {
- if (els[i].savePrefState)
- els[i].savePrefState();
- }
- },
-
- /**
- * Handles the cancel button by closing the overlay.
- */
- handleCancel: function() {
- OptionsPage.closeOverlay();
-
- var els = this.pageDiv.querySelectorAll('[dialog-pref]');
- for (var i = 0; i < els.length; i++) {
- if (els[i].resetPrefState)
- els[i].resetPrefState();
- }
- },
- };
-
- return {
- SettingsDialog: SettingsDialog
- };
-});
« no previous file with comments | « chrome/browser/resources/options2/search_page.js ('k') | chrome/browser/resources/options2/spelling_confirm_overlay.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698