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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/devices/DevicesView.js

Issue 2881453003: DevTools: update buttons to new style (Closed)
Patch Set: find replace updated too! Created 3 years, 7 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
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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Devices.DevicesView = class extends UI.VBox { 7 Devices.DevicesView = class extends UI.VBox {
8 constructor() { 8 constructor() {
9 super(true); 9 super(true);
10 this.registerRequiredCSS('devices/devicesView.css'); 10 this.registerRequiredCSS('devices/devicesView.css');
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 this._addNetworkTargetButtonClicked.bind(this), 'add-network-target-butt on'); 484 this._addNetworkTargetButtonClicked.bind(this), 'add-network-target-butt on');
485 this.element.appendChild(addButton); 485 this.element.appendChild(addButton);
486 486
487 /** @type {!Array<{address: string}>} */ 487 /** @type {!Array<{address: string}>} */
488 this._networkDiscoveryConfig = []; 488 this._networkDiscoveryConfig = [];
489 this._networkDiscoveryEnabled = false; 489 this._networkDiscoveryEnabled = false;
490 490
491 if (nodeFrontend) { 491 if (nodeFrontend) {
492 this.element.classList.add('node-frontend'); 492 this.element.classList.add('node-frontend');
493 this._list.element.classList.add('node-frontend'); 493 this._list.element.classList.add('node-frontend');
494 addButton.classList.add('material-button', 'default'); 494 addButton.classList.add('primary');
dgozman 2017/05/15 21:29:00 Let's do this unconditionally?
luoe 2017/05/18 21:29:25 Done.
495 } 495 }
496 } 496 }
497 497
498 _update() { 498 _update() {
499 var config = this._networkDiscoveryConfig.map(item => item.address); 499 var config = this._networkDiscoveryConfig.map(item => item.address);
500 this._callback.call(null, this._networkDiscoveryEnabled, config); 500 this._callback.call(null, this._networkDiscoveryEnabled, config);
501 } 501 }
502 502
503 _addNetworkTargetButtonClicked() { 503 _addNetworkTargetButtonClicked() {
504 this._list.addNewItem(this._networkDiscoveryConfig.length, {address: ''}); 504 this._list.addNewItem(this._networkDiscoveryConfig.length, {address: ''});
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 } 577 }
578 578
579 /** 579 /**
580 * @return {!UI.ListWidget.Editor} 580 * @return {!UI.ListWidget.Editor}
581 */ 581 */
582 _createEditor() { 582 _createEditor() {
583 if (this._editor) 583 if (this._editor)
584 return this._editor; 584 return this._editor;
585 585
586 var editor = new UI.ListWidget.Editor(); 586 var editor = new UI.ListWidget.Editor();
587 editor.setMaterial(this._nodeFrontend);
588 this._editor = editor; 587 this._editor = editor;
589 var content = editor.contentElement(); 588 var content = editor.contentElement();
590 var fields = content.createChild('div', 'network-discovery-edit-row'); 589 var fields = content.createChild('div', 'network-discovery-edit-row');
591 var input = editor.createInput('address', 'text', 'Network address (e.g. loc alhost:9229)', addressValidator); 590 var input = editor.createInput('address', 'text', 'Network address (e.g. loc alhost:9229)', addressValidator);
592 fields.createChild('div', 'network-discovery-value network-discovery-address ').appendChild(input); 591 fields.createChild('div', 'network-discovery-value network-discovery-address ').appendChild(input);
593 return editor; 592 return editor;
594 593
595 /** 594 /**
596 * @param {*} item 595 * @param {*} item
597 * @param {number} index 596 * @param {number} index
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 932
934 /** 933 /**
935 * @param {!Common.Event} event 934 * @param {!Common.Event} event
936 */ 935 */
937 _devicesDiscoveryConfigChanged(event) { 936 _devicesDiscoveryConfigChanged(event) {
938 this._config = /** @type {!Adb.Config} */ (event.data); 937 this._config = /** @type {!Adb.Config} */ (event.data);
939 this._networkDiscoveryView.discoveryConfigChanged( 938 this._networkDiscoveryView.discoveryConfigChanged(
940 this._config.networkDiscoveryEnabled, this._config.networkDiscoveryConfi g); 939 this._config.networkDiscoveryEnabled, this._config.networkDiscoveryConfi g);
941 } 940 }
942 }; 941 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698