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

Side by Side Diff: Source/devtools/front_end/profiler/ProfileLauncherView.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) 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 WebInspector.MultiProfileLauncherView.prototype = { 182 WebInspector.MultiProfileLauncherView.prototype = {
183 /** 183 /**
184 * @override 184 * @override
185 * @param {!WebInspector.ProfileType} profileType 185 * @param {!WebInspector.ProfileType} profileType
186 */ 186 */
187 addProfileType: function(profileType) 187 addProfileType: function(profileType)
188 { 188 {
189 var labelElement = this._profileTypeSelectorForm.createChild("label"); 189 var labelElement = this._profileTypeSelectorForm.createChild("label");
190 labelElement.textContent = profileType.name; 190 labelElement.textContent = profileType.name;
191 var optionElement = document.createElement("input"); 191 var optionElement = createElement("input");
192 labelElement.insertBefore(optionElement, labelElement.firstChild); 192 labelElement.insertBefore(optionElement, labelElement.firstChild);
193 this._typeIdToOptionElement[profileType.id] = optionElement; 193 this._typeIdToOptionElement[profileType.id] = optionElement;
194 optionElement._profileType = profileType; 194 optionElement._profileType = profileType;
195 optionElement.type = "radio"; 195 optionElement.type = "radio";
196 optionElement.name = "profile-type"; 196 optionElement.name = "profile-type";
197 optionElement.style.hidden = true; 197 optionElement.style.hidden = true;
198 optionElement.addEventListener("change", this._profileTypeChanged.bind(t his, profileType), false); 198 optionElement.addEventListener("change", this._profileTypeChanged.bind(t his, profileType), false);
199 var descriptionElement = labelElement.createChild("p"); 199 var descriptionElement = labelElement.createChild("p");
200 descriptionElement.textContent = profileType.description; 200 descriptionElement.textContent = profileType.description;
201 var decorationElement = profileType.decorationElement(); 201 var decorationElement = profileType.decorationElement();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 profileFinished: function() 250 profileFinished: function()
251 { 251 {
252 this._isProfiling = false; 252 this._isProfiling = false;
253 this._updateControls(); 253 this._updateControls();
254 }, 254 },
255 255
256 __proto__: WebInspector.ProfileLauncherView.prototype 256 __proto__: WebInspector.ProfileLauncherView.prototype
257 } 257 }
258 258
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotView.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698