OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 if (this.hasTouchpad_) | 76 if (this.hasTouchpad_) |
77 return 'settings:touch-app'; | 77 return 'settings:touch-app'; |
78 return ''; | 78 return ''; |
79 }, | 79 }, |
80 | 80 |
81 /** | 81 /** |
82 * Handler for tapping the mouse and touchpad settings menu item. | 82 * Handler for tapping the mouse and touchpad settings menu item. |
83 * @private | 83 * @private |
84 */ | 84 */ |
85 onPointersTap_: function() { | 85 onPointersTap_: function() { |
86 this.$.pages.setSubpageChain(['pointers']); | 86 settings.navigateTo(settings.Route.POINTERS); |
87 }, | 87 }, |
88 | 88 |
89 /** | 89 /** |
90 * Handler for tapping the Keyboard settings menu item. | 90 * Handler for tapping the Keyboard settings menu item. |
91 * @private | 91 * @private |
92 */ | 92 */ |
93 onKeyboardTap_: function() { | 93 onKeyboardTap_: function() { |
94 this.$.pages.setSubpageChain(['keyboard']); | 94 settings.navigateTo(settings.Route.KEYBOARD); |
95 }, | 95 }, |
96 | 96 |
97 /** | 97 /** |
98 * Handler for tapping the Display settings menu item. | 98 * Handler for tapping the Display settings menu item. |
99 * @private | 99 * @private |
100 */ | 100 */ |
101 onDisplayTap_: function() { | 101 onDisplayTap_: function() { |
102 this.$.pages.setSubpageChain(['display']); | 102 settings.navigateTo(settings.Route.DISPLAY); |
103 }, | 103 }, |
104 | 104 |
105 /** @private */ | 105 /** @private */ |
106 currentRouteChanged_: function() { | 106 currentRouteChanged_: function() { |
107 this.checkPointerSubpage_(); | 107 this.checkPointerSubpage_(); |
108 }, | 108 }, |
109 | 109 |
110 /** | 110 /** |
111 * @param {boolean} hasMouse | 111 * @param {boolean} hasMouse |
112 * @param {boolean} hasTouchpad | 112 * @param {boolean} hasTouchpad |
(...skipping 21 matching lines...) Expand all Loading... |
134 * @private | 134 * @private |
135 */ | 135 */ |
136 isCurrentRouteOnPointersPage_: function() { | 136 isCurrentRouteOnPointersPage_: function() { |
137 return this.currentRoute && | 137 return this.currentRoute && |
138 this.currentRoute.page == 'basic' && | 138 this.currentRoute.page == 'basic' && |
139 this.currentRoute.section == 'device' && | 139 this.currentRoute.section == 'device' && |
140 this.currentRoute.subpage.length == 1 && | 140 this.currentRoute.subpage.length == 1 && |
141 this.currentRoute.subpage[0] == 'pointers'; | 141 this.currentRoute.subpage[0] == 'pointers'; |
142 }, | 142 }, |
143 }); | 143 }); |
OLD | NEW |