Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Polymer element for displaying a bluetooth device in a list. | 6 * @fileoverview Polymer element for displaying a bluetooth device in a list. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'bluetooth-device-list-item', | 10 is: 'bluetooth-device-list-item', |
| 11 | 11 |
| 12 behaviors: [I18nBehavior], | 12 behaviors: [I18nBehavior], |
| 13 | 13 |
| 14 properties: { | 14 properties: { |
| 15 /** | 15 /** |
| 16 * The bluetooth device. | 16 * The bluetooth device. |
| 17 * @type {!chrome.bluetooth.Device} | 17 * @type {!chrome.bluetooth.Device} |
| 18 */ | 18 */ |
| 19 device: { | 19 device: { |
| 20 type: Object, | 20 type: Object, |
| 21 }, | 21 }, |
| 22 }, | 22 }, |
| 23 | 23 |
| 24 doNothing_: function() { | |
|
dschuyler
2017/07/13 00:47:13
/** @private */
and maybe(?) rename to something
scottchen
2017/07/13 18:34:00
Done.
| |
| 25 if (event.key == 'Enter') { | |
| 26 event.stopPropagation(); | |
| 27 } | |
| 28 }, | |
| 29 | |
| 24 /** | 30 /** |
| 25 * @param {!Event} event | 31 * @param {!Event} event |
| 26 * @private | 32 * @private |
| 27 */ | 33 */ |
| 28 onMenuButtonTap_: function(event) { | 34 onMenuButtonTap_: function(event) { |
| 29 var button = /** @type {!HTMLElement} */ (event.target); | 35 var button = /** @type {!HTMLElement} */ (event.target); |
| 30 var menu = /** @type {!CrActionMenuElement} */ (this.$.dotsMenu); | 36 var menu = /** @type {!CrActionMenuElement} */ (this.$.dotsMenu); |
| 31 menu.showAt(button); | 37 menu.showAt(button); |
| 32 event.stopPropagation(); | 38 event.stopPropagation(); |
| 33 }, | 39 }, |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 case 'tablet': | 135 case 'tablet': |
| 130 return 'settings:tablet'; | 136 return 'settings:tablet'; |
| 131 case 'mouse': | 137 case 'mouse': |
| 132 return 'settings:mouse'; | 138 return 'settings:mouse'; |
| 133 default: | 139 default: |
| 134 return device.connected ? 'settings:bluetooth-connected' : | 140 return device.connected ? 'settings:bluetooth-connected' : |
| 135 'settings:bluetooth'; | 141 'settings:bluetooth'; |
| 136 } | 142 } |
| 137 }, | 143 }, |
| 138 }); | 144 }); |
| OLD | NEW |