| 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 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 */ | 8 */ |
| 9 WebInspector.DevicesSettingsTab = function() | 9 WebInspector.DevicesSettingsTab = function() |
| 10 { | 10 { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 { | 89 { |
| 90 var item = createElementWithClass("div", "devices-list-item"); | 90 var item = createElementWithClass("div", "devices-list-item"); |
| 91 var checkbox = item.createChild("input", "devices-list-checkbox"); | 91 var checkbox = item.createChild("input", "devices-list-checkbox"); |
| 92 checkbox.type = "checkbox"; | 92 checkbox.type = "checkbox"; |
| 93 checkbox.checked = device.show(); | 93 checkbox.checked = device.show(); |
| 94 item.createChild("div", "devices-list-title").textContent = device.title
; | 94 item.createChild("div", "devices-list-title").textContent = device.title
; |
| 95 item.addEventListener("click", onItemClicked.bind(this), false); | 95 item.addEventListener("click", onItemClicked.bind(this), false); |
| 96 item.classList.toggle("device-list-item-show", device.show()); | 96 item.classList.toggle("device-list-item-show", device.show()); |
| 97 if (custom) { | 97 if (custom) { |
| 98 var editButton = item.createChild("div", "devices-list-edit"); | 98 var editButton = item.createChild("div", "devices-list-edit"); |
| 99 WebInspector.Tooltip.install(editButton, WebInspector.UIString("Edit
")); | 99 editButton.title = WebInspector.UIString("Edit"); |
| 100 editButton.addEventListener("click", onEditClicked.bind(this), false
); | 100 editButton.addEventListener("click", onEditClicked.bind(this), false
); |
| 101 | 101 |
| 102 var removeButton = item.createChild("div", "devices-list-remove"); | 102 var removeButton = item.createChild("div", "devices-list-remove"); |
| 103 WebInspector.Tooltip.install(removeButton, WebInspector.UIString("Re
move")); | 103 removeButton.title = WebInspector.UIString("Remove"); |
| 104 removeButton.addEventListener("click", onRemoveClicked, false); | 104 removeButton.addEventListener("click", onRemoveClicked, false); |
| 105 } | 105 } |
| 106 | 106 |
| 107 /** | 107 /** |
| 108 * @param {!Event} event | 108 * @param {!Event} event |
| 109 * @this {WebInspector.DevicesSettingsTab} | 109 * @this {WebInspector.DevicesSettingsTab} |
| 110 */ | 110 */ |
| 111 function onItemClicked(event) | 111 function onItemClicked(event) |
| 112 { | 112 { |
| 113 var show = !checkbox.checked; | 113 var show = !checkbox.checked; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 if (this._editDeviceListItem) | 300 if (this._editDeviceListItem) |
| 301 this._editDeviceListItem.classList.remove("hidden"); | 301 this._editDeviceListItem.classList.remove("hidden"); |
| 302 if (this._editDeviceElement.parentElement) | 302 if (this._editDeviceElement.parentElement) |
| 303 this._devicesList.removeChild(this._editDeviceElement); | 303 this._devicesList.removeChild(this._editDeviceElement); |
| 304 this._addCustomButton.disabled = false; | 304 this._addCustomButton.disabled = false; |
| 305 this._addCustomButton.focus(); | 305 this._addCustomButton.focus(); |
| 306 }, | 306 }, |
| 307 | 307 |
| 308 __proto__: WebInspector.VBox.prototype | 308 __proto__: WebInspector.VBox.prototype |
| 309 } | 309 } |
| OLD | NEW |