OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |