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

Unified Diff: chrome/browser/resources/settings/device_page/pointers.js

Issue 2110833003: MD Settings: Add mouse settings, update pointer settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PointersFake
Patch Set: rebase Created 4 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/settings/device_page/pointers.js
diff --git a/chrome/browser/resources/settings/device_page/pointers.js b/chrome/browser/resources/settings/device_page/pointers.js
new file mode 100644
index 0000000000000000000000000000000000000000..51ff1ef56e300b6818a0e7a913754f089316a57a
--- /dev/null
+++ b/chrome/browser/resources/settings/device_page/pointers.js
@@ -0,0 +1,55 @@
+// Copyright 2016 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-pointers' is the settings subpage with mouse and touchpad settings.
+ */
+Polymer({
+ is: 'settings-pointers',
+
+ properties: {
+ /** Preferences state. */
+ prefs: {
+ type: Object,
+ notify: true,
+ },
+
+ hasMouse: {
+ type: Boolean,
+ value: false,
+ },
+
+ hasTouchpad: {
+ type: Boolean,
+ value: false,
+ },
+
+ /**
+ * TODO(michaelpg): cr-slider should optionally take a min and max so we
+ * don't have to generate a simple range of natural numbers ourselves.
+ * @const {!Array<number>}
+ * @private
+ */
+ sensitivityValues_: {
+ type: Array,
+ value: [1, 2, 3, 4, 5],
+ readOnly: true,
+ },
+ },
+
+ /**
+ * Prevents the link from activating its parent paper-radio-button.
+ * @param {!Event} e
+ * @private
+ */
+ onLearnMoreLinkActivated_: function(e) {
+ settings.DevicePageBrowserProxyImpl.getInstance().handleLinkEvent(e);
+ },
+
+ // Mouse and touchpad sections are only subsections if they are both present.
+ getSectionClass_: function(hasMouse, hasTouchpad) {
+ return hasMouse && hasTouchpad ? 'subsection' : '';
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698