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

Side by Side Diff: Source/devtools/front_end/emulation/DevicesSettingsTab.js

Issue 1300703004: DevTools: only set title w/ shortcut via Tooltip manager API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 5 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | Source/devtools/front_end/emulation/OverridesUI.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698