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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js

Issue 2647153002: [DevTools] Improve context and target naming. (Closed)
Patch Set: fixed comments and sorting 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 * @param {!SDK.ExecutionContext} a 461 * @param {!SDK.ExecutionContext} a
462 * @param {!SDK.ExecutionContext} b 462 * @param {!SDK.ExecutionContext} b
463 * @return {number} 463 * @return {number}
464 */ 464 */
465 static comparator(a, b) { 465 static comparator(a, b) {
466 /** 466 /**
467 * @param {!SDK.Target} target 467 * @param {!SDK.Target} target
468 * @return {number} 468 * @return {number}
469 */ 469 */
470 function targetWeight(target) { 470 function targetWeight(target) {
471 if (!target.parentTarget())
472 return 4;
471 if (target.hasBrowserCapability()) 473 if (target.hasBrowserCapability())
472 return 3; 474 return 3;
473 if (target.hasJSCapability()) 475 if (target.hasJSCapability())
474 return 2; 476 return 2;
475 return 1; 477 return 1;
476 } 478 }
477 479
478 var weightDiff = targetWeight(a.target()) - targetWeight(b.target()); 480 var weightDiff = targetWeight(a.target()) - targetWeight(b.target());
479 if (weightDiff) 481 if (weightDiff)
480 return -weightDiff; 482 return -weightDiff;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 this._type === 'wheel'; 782 this._type === 'wheel';
781 } 783 }
782 784
783 /** 785 /**
784 * @return {boolean} 786 * @return {boolean}
785 */ 787 */
786 isNormalListenerType() { 788 isNormalListenerType() {
787 return this._listenerType === 'normal'; 789 return this._listenerType === 'normal';
788 } 790 }
789 }; 791 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698