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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/autofill_category.js

Issue 1457713007: Update the "Passwords and Forms" section so that they can be toggled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/settings/passwords_and_forms_page/autofill_category.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_category.js b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_category.js
new file mode 100644
index 0000000000000000000000000000000000000000..44edbabe04c8044534b98629080ebae32a741a50
--- /dev/null
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_category.js
@@ -0,0 +1,61 @@
+// Copyright 2015 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 'settings-passwords-and-forms-page' is the settings page
dschuyler 2015/11/20 20:02:50 This looks like it is referring to a type: 'settin
+ * for passwords and auto fill.
+ *
+ * @group Chrome Settings Elements
+ * @element settings-passwords-and-forms-page
+ */
+(function() {
+'use strict';
+
+Polymer({
+ is: 'autofill-category',
+
+ properties: {
+ /**
+ * Preferences state.
dschuyler 2015/11/20 20:02:50 Add @type for the Object. For simple properties li
+ */
+ prefs: {
+ type: Object,
+ notify: true,
+ },
+
+ /**
+ * The category's title.
+ */
+ title: {
+ type: String,
+ },
+
+ /**
+ * Description for this category.
+ */
+ detail: {
+ type: String,
+ },
+
+ /**
+ * The name of the API to set the preference.
+ */
+ prefUpdate: {
+ type: String,
+ },
+
+ /**
+ * Whether or not this category is set to on/off.
+ */
+ checked: {
+ type: Boolean,
+ value: false,
+ },
+ },
+
+ onToggleChange_: function(event) {
+ chrome.send(this.prefUpdate, [this.checked]);
dschuyler 2015/11/20 20:02:50 Does this need to be an array: [this.checked]?
+ },
+});
+})();

Powered by Google App Engine
This is Rietveld 408576698