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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layer_viewer/PaintProfilerView.js

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 /** 357 /**
358 * @unrestricted 358 * @unrestricted
359 */ 359 */
360 LayerViewer.PaintProfilerCommandLogView = class extends UI.ThrottledWidget { 360 LayerViewer.PaintProfilerCommandLogView = class extends UI.ThrottledWidget {
361 constructor() { 361 constructor() {
362 super(); 362 super();
363 this.setMinimumSize(100, 25); 363 this.setMinimumSize(100, 25);
364 this.element.classList.add('overflow-auto'); 364 this.element.classList.add('overflow-auto');
365 365
366 this._treeOutline = new TreeOutlineInShadow(); 366 this._treeOutline = new UI.TreeOutlineInShadow();
367 this.element.appendChild(this._treeOutline.element); 367 this.element.appendChild(this._treeOutline.element);
368 368
369 this._log = []; 369 this._log = [];
370 } 370 }
371 371
372 /** 372 /**
373 * @param {?SDK.Target} target 373 * @param {?SDK.Target} target
374 * @param {!Array.<!SDK.PaintProfilerLogItem>} log 374 * @param {!Array.<!SDK.PaintProfilerLogItem>} log
375 */ 375 */
376 setCommandLog(target, log) { 376 setCommandLog(target, log) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 427 }
428 for (var i = this._selectionWindow.left, right = this._selectionWindow.right ; i < right; ++i) 428 for (var i = this._selectionWindow.left, right = this._selectionWindow.right ; i < right; ++i)
429 this._appendLogItem(this._log[i]); 429 this._appendLogItem(this._log[i]);
430 return Promise.resolve(); 430 return Promise.resolve();
431 } 431 }
432 }; 432 };
433 433
434 /** 434 /**
435 * @unrestricted 435 * @unrestricted
436 */ 436 */
437 LayerViewer.LogTreeElement = class extends TreeElement { 437 LayerViewer.LogTreeElement = class extends UI.TreeElement {
438 /** 438 /**
439 * @param {!LayerViewer.PaintProfilerCommandLogView} ownerView 439 * @param {!LayerViewer.PaintProfilerCommandLogView} ownerView
440 * @param {!SDK.PaintProfilerLogItem} logItem 440 * @param {!SDK.PaintProfilerLogItem} logItem
441 */ 441 */
442 constructor(ownerView, logItem) { 442 constructor(ownerView, logItem) {
443 super('', !!logItem.params); 443 super('', !!logItem.params);
444 this._logItem = logItem; 444 this._logItem = logItem;
445 this._ownerView = ownerView; 445 this._ownerView = ownerView;
446 this._filled = false; 446 this._filled = false;
447 } 447 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 _update() { 499 _update() {
500 var title = createDocumentFragment(); 500 var title = createDocumentFragment();
501 title.createTextChild(this._logItem.method + '(' + this._paramsToString(this ._logItem.params) + ')'); 501 title.createTextChild(this._logItem.method + '(' + this._paramsToString(this ._logItem.params) + ')');
502 this.title = title; 502 this.title = title;
503 } 503 }
504 }; 504 };
505 505
506 /** 506 /**
507 * @unrestricted 507 * @unrestricted
508 */ 508 */
509 LayerViewer.LogPropertyTreeElement = class extends TreeElement { 509 LayerViewer.LogPropertyTreeElement = class extends UI.TreeElement {
510 /** 510 /**
511 * @param {!{name: string, value}} property 511 * @param {!{name: string, value}} property
512 */ 512 */
513 constructor(property) { 513 constructor(property) {
514 super(); 514 super();
515 this._property = property; 515 this._property = property;
516 } 516 }
517 517
518 /** 518 /**
519 * @param {!TreeElement} element 519 * @param {!UI.TreeElement} element
520 * @param {string} name 520 * @param {string} name
521 * @param {*} value 521 * @param {*} value
522 */ 522 */
523 static _appendLogPropertyItem(element, name, value) { 523 static _appendLogPropertyItem(element, name, value) {
524 var treeElement = new LayerViewer.LogPropertyTreeElement({name: name, value: value}); 524 var treeElement = new LayerViewer.LogPropertyTreeElement({name: name, value: value});
525 element.appendChild(treeElement); 525 element.appendChild(treeElement);
526 if (value && typeof value === 'object') { 526 if (value && typeof value === 'object') {
527 for (var property in value) 527 for (var property in value)
528 LayerViewer.LogPropertyTreeElement._appendLogPropertyItem(treeElement, p roperty, value[property]); 528 LayerViewer.LogPropertyTreeElement._appendLogPropertyItem(treeElement, p roperty, value[property]);
529 } 529 }
(...skipping 26 matching lines...) Expand all
556 * @param {string} name 556 * @param {string} name
557 * @param {string} title 557 * @param {string} title
558 * @param {string} color 558 * @param {string} color
559 */ 559 */
560 constructor(name, title, color) { 560 constructor(name, title, color) {
561 this.name = name; 561 this.name = name;
562 this.title = title; 562 this.title = title;
563 this.color = color; 563 this.color = color;
564 } 564 }
565 }; 565 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698