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

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

Issue 9296038: [uber] Redoing the homepage selection UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 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
« no previous file with comments | « chrome/browser/resources/options2/pref_ui.js ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index f225de2bf197182dbf7c7eadc63dd643689acb73..7128c0db0dfd43b66f86de76f6b941899441a7cc 100644
--- a/chrome/browser/resources/options2/settings_dialog.js
+++ b/chrome/browser/resources/options2/settings_dialog.js
@@ -42,6 +42,7 @@ cr.define('options', function() {
* @private
*/
handleConfirm_: function() {
+ this.willConfirm();
OptionsPage.closeOverlay();
var els = this.pageDiv.querySelectorAll('[dialog-pref]');
@@ -56,6 +57,7 @@ cr.define('options', function() {
* @private
*/
handleCancel_: function() {
+ this.willCancel();
OptionsPage.closeOverlay();
var els = this.pageDiv.querySelectorAll('[dialog-pref]');
@@ -64,6 +66,18 @@ cr.define('options', function() {
els[i].resetPrefState();
}
},
+
+ /**
+ * Called when the user clicks the confirm button, just before the
+ * preferences are saved. This is a no-op, but subclasses can override it.
+ */
+ willConfirm: function() {},
+
+ /**
+ * Called when the user cancels the dialog, just before the
+ * dialog is closed. This is a no-op, but subclasses can override it.
+ */
+ willCancel: function() {},
};
return {
« no previous file with comments | « chrome/browser/resources/options2/pref_ui.js ('k') | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698