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

Side by Side Diff: Source/devtools/front_end/ui/ProgressIndicator.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
« no previous file with comments | « Source/devtools/front_end/ui/Popover.js ('k') | Source/devtools/front_end/ui/SettingsUI.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @implements {WebInspector.Progress} 33 * @implements {WebInspector.Progress}
34 * @extends {WebInspector.Object} 34 * @extends {WebInspector.Object}
35 */ 35 */
36 WebInspector.ProgressIndicator = function() 36 WebInspector.ProgressIndicator = function()
37 { 37 {
38 this.element = document.createElementWithClass("div", "progress-bar-containe r"); 38 this.element = createElementWithClass("div", "progress-bar-container");
39 this._labelElement = this.element.createChild("span"); 39 this._labelElement = this.element.createChild("span");
40 this._progressElement = this.element.createChild("progress"); 40 this._progressElement = this.element.createChild("progress");
41 this._stopButton = new WebInspector.StatusBarButton(WebInspector.UIString("C ancel"), "progress-bar-stop-button"); 41 this._stopButton = new WebInspector.StatusBarButton(WebInspector.UIString("C ancel"), "progress-bar-stop-button");
42 this._stopButton.addEventListener("click", this.cancel, this); 42 this._stopButton.addEventListener("click", this.cancel, this);
43 this.element.appendChild(this._stopButton.element); 43 this.element.appendChild(this._stopButton.element);
44 this._isCanceled = false; 44 this._isCanceled = false;
45 this._worked = 0; 45 this._worked = 0;
46 } 46 }
47 47
48 WebInspector.ProgressIndicator.prototype = { 48 WebInspector.ProgressIndicator.prototype = {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 /** 115 /**
116 * @param {number=} worked 116 * @param {number=} worked
117 */ 117 */
118 worked: function(worked) 118 worked: function(worked)
119 { 119 {
120 this.setWorked(this._worked + (worked || 1)); 120 this.setWorked(this._worked + (worked || 1));
121 }, 121 },
122 122
123 __proto__: WebInspector.Object.prototype 123 __proto__: WebInspector.Object.prototype
124 } 124 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/Popover.js ('k') | Source/devtools/front_end/ui/SettingsUI.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698