OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 | 6 |
7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
9 // SystemOptions class: | 9 // SystemOptions class: |
10 | 10 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 */ | 129 */ |
130 SystemOptions.SetAccessibilityCheckboxState = function(checked) { | 130 SystemOptions.SetAccessibilityCheckboxState = function(checked) { |
131 $('accesibility-check').checked = checked; | 131 $('accesibility-check').checked = checked; |
132 }; | 132 }; |
133 | 133 |
134 /** | 134 /** |
135 * Activate the bluetooth settings section on the System settings page. | 135 * Activate the bluetooth settings section on the System settings page. |
136 */ | 136 */ |
137 SystemOptions.showBluetoothSettings = function() { | 137 SystemOptions.showBluetoothSettings = function() { |
138 $('bluetooth-devices').hidden = false; | 138 $('bluetooth-devices').hidden = false; |
139 } | 139 }; |
140 | 140 |
141 /** | 141 /** |
142 * Adds an element to the list of available bluetooth devices. | 142 * Adds an element to the list of available bluetooth devices. |
143 * @param{{'deviceName': string, | 143 * @param{{'deviceName': string, |
144 * 'deviceId': string, | 144 * 'deviceId': string, |
145 * 'deviceType': Constants.DEVICE_TYPE, | 145 * 'deviceType': Constants.DEVICE_TYPE, |
146 * 'deviceStatus': Constants.DEVICE_STATUS} device | 146 * 'deviceStatus': Constants.DEVICE_STATUS} device |
147 * Decription of the bluetooth device. | 147 * Decription of the bluetooth device. |
148 */ | 148 */ |
149 SystemOptions.addBluetoothDevice = function(device) { | 149 SystemOptions.addBluetoothDevice = function(device) { |
150 $('bluetooth-device-list').appendDevice(device); | 150 $('bluetooth-device-list').appendDevice(device); |
151 } | 151 }; |
152 | 152 |
153 /** | 153 /** |
154 * Hides the scanning label and icon that are used to indicate that a device | 154 * Hides the scanning label and icon that are used to indicate that a device |
155 * search is in progress. | 155 * search is in progress. |
156 */ | 156 */ |
157 SystemOptions.notifyBluetoothSearchComplete = function() { | 157 SystemOptions.notifyBluetoothSearchComplete = function() { |
158 // TDOO (kevers) - Reset state immediately once results are received | 158 // TODO (kevers) - Reset state immediately once results are received |
159 // asynchronously. | 159 // asynchronously. |
160 setTimeout(function() { | 160 setTimeout(function() { |
161 setVisibility_('bluetooth-scanning-label', false); | 161 setVisibility_('bluetooth-scanning-label', false); |
162 setVisibility_('bluetooth-scanning-icon', false); | 162 setVisibility_('bluetooth-scanning-icon', false); |
163 }, 2000); | 163 }, 2000); |
164 } | 164 }; |
| 165 |
| 166 /** |
| 167 * Enables the Tap-To-Click radio button when we detect a touchpad. |
| 168 */ |
| 169 SystemOptions.showTapToClick = function() { |
| 170 $('tap-to-click').hidden = false; |
| 171 }; |
165 | 172 |
166 // Export | 173 // Export |
167 return { | 174 return { |
168 SystemOptions: SystemOptions | 175 SystemOptions: SystemOptions |
169 }; | 176 }; |
170 | 177 |
171 }); | 178 }); |
OLD | NEW |