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

Side by Side Diff: chrome/browser/resources/settings/device_page/device_page.js

Issue 2178213002: Add note page to settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylus-add-switch
Patch Set: Address comments and add utility method Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 'settings-device-page' is the settings page for device and 6 * @fileoverview 'settings-device-page' is the settings page for device and
7 * peripheral settings. 7 * peripheral settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-device-page', 10 is: 'settings-device-page',
(...skipping 21 matching lines...) Expand all
32 hasMouse_: { 32 hasMouse_: {
33 type: Boolean, 33 type: Boolean,
34 value: false, 34 value: false,
35 }, 35 },
36 36
37 /** @private */ 37 /** @private */
38 hasTouchpad_: { 38 hasTouchpad_: {
39 type: Boolean, 39 type: Boolean,
40 value: false, 40 value: false,
41 }, 41 },
42
43 /** @private */
44 noteAllowed_: {
45 type: Boolean,
46 value: function() {
47 return loadTimeData.getBoolean('noteAllowed');
48 },
49 readOnly: true,
50 },
42 }, 51 },
43 52
44 observers: [ 53 observers: [
45 'pointersChanged_(hasMouse_, hasTouchpad_)', 54 'pointersChanged_(hasMouse_, hasTouchpad_)',
46 ], 55 ],
47 56
48 ready: function() { 57 ready: function() {
49 cr.addWebUIListener('has-mouse-changed', this.set.bind(this, 'hasMouse_')); 58 cr.addWebUIListener('has-mouse-changed', this.set.bind(this, 'hasMouse_'));
50 cr.addWebUIListener( 59 cr.addWebUIListener(
51 'has-touchpad-changed', this.set.bind(this, 'hasTouchpad_')); 60 'has-touchpad-changed', this.set.bind(this, 'hasTouchpad_'));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 97
89 /** 98 /**
90 * Handler for tapping the Keyboard settings menu item. 99 * Handler for tapping the Keyboard settings menu item.
91 * @private 100 * @private
92 */ 101 */
93 onKeyboardTap_: function() { 102 onKeyboardTap_: function() {
94 this.$.pages.setSubpageChain(['keyboard']); 103 this.$.pages.setSubpageChain(['keyboard']);
95 }, 104 },
96 105
97 /** 106 /**
107 * Handler for tapping the Keyboard settings menu item.
108 * @private
109 */
110 onNoteTap_: function() {
111 this.$.pages.setSubpageChain(['note']);
112 },
113
114 /**
98 * Handler for tapping the Display settings menu item. 115 * Handler for tapping the Display settings menu item.
99 * @private 116 * @private
100 */ 117 */
101 onDisplayTap_: function() { 118 onDisplayTap_: function() {
102 this.$.pages.setSubpageChain(['display']); 119 this.$.pages.setSubpageChain(['display']);
103 }, 120 },
104 121
105 /** @private */ 122 /** @private */
106 currentRouteChanged_: function() { 123 currentRouteChanged_: function() {
107 this.checkPointerSubpage_(); 124 this.checkPointerSubpage_();
(...skipping 26 matching lines...) Expand all
134 * @private 151 * @private
135 */ 152 */
136 isCurrentRouteOnPointersPage_: function() { 153 isCurrentRouteOnPointersPage_: function() {
137 return this.currentRoute && 154 return this.currentRoute &&
138 this.currentRoute.page == 'basic' && 155 this.currentRoute.page == 'basic' &&
139 this.currentRoute.section == 'device' && 156 this.currentRoute.section == 'device' &&
140 this.currentRoute.subpage.length == 1 && 157 this.currentRoute.subpage.length == 1 &&
141 this.currentRoute.subpage[0] == 'pointers'; 158 this.currentRoute.subpage[0] == 'pointers';
142 }, 159 },
143 }); 160 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698