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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 1748993002: DevTools: Initial implementation of line-level CPU profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove JSSF to sdk dependency Created 4 years, 9 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /** 64 /**
65 * @enum {string} 65 * @enum {string}
66 */ 66 */
67 WebInspector.UISourceCode.Events = { 67 WebInspector.UISourceCode.Events = {
68 WorkingCopyChanged: "WorkingCopyChanged", 68 WorkingCopyChanged: "WorkingCopyChanged",
69 WorkingCopyCommitted: "WorkingCopyCommitted", 69 WorkingCopyCommitted: "WorkingCopyCommitted",
70 TitleChanged: "TitleChanged", 70 TitleChanged: "TitleChanged",
71 SourceMappingChanged: "SourceMappingChanged", 71 SourceMappingChanged: "SourceMappingChanged",
72 MessageAdded: "MessageAdded", 72 MessageAdded: "MessageAdded",
73 MessageRemoved: "MessageRemoved", 73 MessageRemoved: "MessageRemoved",
74 ProfileInfoUpdated: "ProfileInfoUpdated"
74 } 75 }
75 76
76 WebInspector.UISourceCode.prototype = { 77 WebInspector.UISourceCode.prototype = {
77 /** 78 /**
78 * @return {string} 79 * @return {string}
79 */ 80 */
80 name: function() 81 name: function()
81 { 82 {
82 return this._name; 83 return this._name;
83 }, 84 },
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 }, 638 },
638 639
639 removeAllMessages: function() 640 removeAllMessages: function()
640 { 641 {
641 var messages = this._messages; 642 var messages = this._messages;
642 this._messages = []; 643 this._messages = [];
643 for (var message of messages) 644 for (var message of messages)
644 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.Messa geRemoved, message); 645 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.Messa geRemoved, message);
645 }, 646 },
646 647
648 /**
649 * @param {?Map<number, number>} profileInfo
650 */
651 setProfileInfo: function(profileInfo)
652 {
653 this._profileInfo = profileInfo;
654 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ProfileIn foUpdated);
655 },
656
657 /**
658 * @return {!Map<number, number>}
659 */
660 profileInfo: function()
661 {
662 return this._profileInfo;
663 },
664
647 __proto__: WebInspector.Object.prototype 665 __proto__: WebInspector.Object.prototype
648 } 666 }
649 667
650 /** 668 /**
651 * @constructor 669 * @constructor
652 * @param {!WebInspector.UISourceCode} uiSourceCode 670 * @param {!WebInspector.UISourceCode} uiSourceCode
653 * @param {number} lineNumber 671 * @param {number} lineNumber
654 * @param {number} columnNumber 672 * @param {number} columnNumber
655 */ 673 */
656 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber) 674 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 * @return {string} 848 * @return {string}
831 */ 849 */
832 text: function() 850 text: function()
833 { 851 {
834 return this._text; 852 return this._text;
835 }, 853 },
836 854
837 /** 855 /**
838 * @return {!WebInspector.TextRange} 856 * @return {!WebInspector.TextRange}
839 */ 857 */
840 range: function() { 858 range: function()
859 {
841 return this._range; 860 return this._range;
842 }, 861 },
843 862
844 /** 863 /**
845 * @return {number} 864 * @return {number}
846 */ 865 */
847 lineNumber: function() 866 lineNumber: function()
848 { 867 {
849 return this._range.startLine; 868 return this._range.startLine;
850 }, 869 },
(...skipping 13 matching lines...) Expand all
864 isEqual: function(another) 883 isEqual: function(another)
865 { 884 {
866 return this._uiSourceCode === another._uiSourceCode && this.text() === a nother.text() && this.level() === another.level() && this.range().equal(another. range()); 885 return this._uiSourceCode === another._uiSourceCode && this.text() === a nother.text() && this.level() === another.level() && this.range().equal(another. range());
867 }, 886 },
868 887
869 remove: function() 888 remove: function()
870 { 889 {
871 this._uiSourceCode.removeMessage(this); 890 this._uiSourceCode.removeMessage(this);
872 } 891 }
873 } 892 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698