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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/ListWidget.js

Issue 1412463006: [DevTools] Use ListWidget to render DevicesSettingsTab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/emulation/devicesSettingsTab.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * @param {!WebInspector.ListWidget.Delegate} delegate 8 * @param {!WebInspector.ListWidget.Delegate} delegate
9 */ 9 */
10 WebInspector.ListWidget = function(delegate) 10 WebInspector.ListWidget = function(delegate)
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 * @param {string} commitButtonTitle 383 * @param {string} commitButtonTitle
384 * @param {function()} commit 384 * @param {function()} commit
385 * @param {function()} cancel 385 * @param {function()} cancel
386 */ 386 */
387 beginEdit: function(commitButtonTitle, commit, cancel) 387 beginEdit: function(commitButtonTitle, commit, cancel)
388 { 388 {
389 this._commit = commit; 389 this._commit = commit;
390 this._cancel = cancel; 390 this._cancel = cancel;
391 391
392 this._commitButton.textContent = commitButtonTitle; 392 this._commitButton.textContent = commitButtonTitle;
393 this._commitButton.scrollIntoView(); 393 this.element.scrollIntoView();
394 if (this._controls.length) 394 if (this._controls.length)
395 this._controls[0].focus(); 395 this._controls[0].focus();
396 this._validateControls(true); 396 this._validateControls(true);
397 }, 397 },
398 398
399 _commitClicked: function() 399 _commitClicked: function()
400 { 400 {
401 if (this._commitButton.disabled) 401 if (this._commitButton.disabled)
402 return; 402 return;
403 403
404 var commit = this._commit; 404 var commit = this._commit;
405 this._commit = null; 405 this._commit = null;
406 this._cancel = null; 406 this._cancel = null;
407 commit(); 407 commit();
408 }, 408 },
409 409
410 _cancelClicked: function() 410 _cancelClicked: function()
411 { 411 {
412 var cancel = this._cancel; 412 var cancel = this._cancel;
413 this._commit = null; 413 this._commit = null;
414 this._cancel = null; 414 this._cancel = null;
415 cancel(); 415 cancel();
416 } 416 }
417 } 417 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/emulation/devicesSettingsTab.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698