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

Side by Side Diff: Source/devtools/front_end/profiler/CPUProfileView.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 var options = {}; 50 var options = {};
51 options[WebInspector.CPUProfileView._TypeFlame] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Chart"), "", WebInspector.CPUProfileView._Type Flame); 51 options[WebInspector.CPUProfileView._TypeFlame] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Chart"), "", WebInspector.CPUProfileView._Type Flame);
52 options[WebInspector.CPUProfileView._TypeHeavy] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Heavy (Bottom Up)"), "", WebInspector.CPUProfi leView._TypeHeavy); 52 options[WebInspector.CPUProfileView._TypeHeavy] = this.viewSelectComboBox.cr eateOption(WebInspector.UIString("Heavy (Bottom Up)"), "", WebInspector.CPUProfi leView._TypeHeavy);
53 options[WebInspector.CPUProfileView._TypeTree] = this.viewSelectComboBox.cre ateOption(WebInspector.UIString("Tree (Top Down)"), "", WebInspector.CPUProfileV iew._TypeTree); 53 options[WebInspector.CPUProfileView._TypeTree] = this.viewSelectComboBox.cre ateOption(WebInspector.UIString("Tree (Top Down)"), "", WebInspector.CPUProfileV iew._TypeTree);
54 54
55 var optionName = this._viewType.get() || WebInspector.CPUProfileView._TypeFl ame; 55 var optionName = this._viewType.get() || WebInspector.CPUProfileView._TypeFl ame;
56 var option = options[optionName] || options[WebInspector.CPUProfileView._Typ eFlame]; 56 var option = options[optionName] || options[WebInspector.CPUProfileView._Typ eFlame];
57 this.viewSelectComboBox.select(option); 57 this.viewSelectComboBox.select(option);
58 58
59 this._statusBarButtonsElement = document.createElement("span"); 59 this._statusBarButtonsElement = createElement("span");
60 60
61 this.focusButton = new WebInspector.StatusBarButton(WebInspector.UIString("F ocus selected function."), "focus-profile-node-status-bar-item"); 61 this.focusButton = new WebInspector.StatusBarButton(WebInspector.UIString("F ocus selected function."), "focus-profile-node-status-bar-item");
62 this.focusButton.setEnabled(false); 62 this.focusButton.setEnabled(false);
63 this.focusButton.addEventListener("click", this._focusClicked, this); 63 this.focusButton.addEventListener("click", this._focusClicked, this);
64 this._statusBarButtonsElement.appendChild(this.focusButton.element); 64 this._statusBarButtonsElement.appendChild(this.focusButton.element);
65 65
66 this.excludeButton = new WebInspector.StatusBarButton(WebInspector.UIString( "Exclude selected function."), "exclude-profile-node-status-bar-item"); 66 this.excludeButton = new WebInspector.StatusBarButton(WebInspector.UIString( "Exclude selected function."), "exclude-profile-node-status-bar-item");
67 this.excludeButton.setEnabled(false); 67 this.excludeButton.setEnabled(false);
68 this.excludeButton.addEventListener("click", this._excludeClicked, this); 68 this.excludeButton.addEventListener("click", this._excludeClicked, this);
69 this._statusBarButtonsElement.appendChild(this.excludeButton.element); 69 this._statusBarButtonsElement.appendChild(this.excludeButton.element);
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 _notifyTempFileReady: function() 888 _notifyTempFileReady: function()
889 { 889 {
890 if (this._onTempFileReady) { 890 if (this._onTempFileReady) {
891 this._onTempFileReady(); 891 this._onTempFileReady();
892 this._onTempFileReady = null; 892 this._onTempFileReady = null;
893 } 893 }
894 }, 894 },
895 895
896 __proto__: WebInspector.ProfileHeader.prototype 896 __proto__: WebInspector.ProfileHeader.prototype
897 } 897 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/CPUProfileDataGrid.js ('k') | Source/devtools/front_end/profiler/CanvasProfileView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698