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 19 matching lines...) Expand all Loading... |
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 = createElementWithClass("div", "progress-indicator") | 38 this.element = createElementWithClass("div", "progress-indicator") |
39 this._shadowRoot = this.element.createShadowRoot(); | 39 this._shadowRoot = this.element.createShadowRoot(); |
40 this._shadowRoot.appendChild(WebInspector.View.createStyleElement("ui/progre
ssIndicator.css")); | 40 this._shadowRoot.appendChild(WebInspector.Widget.createStyleElement("ui/prog
ressIndicator.css")); |
41 this._contentElement = this._shadowRoot.createChild("div", "progress-indicat
or-shadow-container"); | 41 this._contentElement = this._shadowRoot.createChild("div", "progress-indicat
or-shadow-container"); |
42 | 42 |
43 this._labelElement = this._contentElement.createChild("div", "title"); | 43 this._labelElement = this._contentElement.createChild("div", "title"); |
44 this._progressElement = this._contentElement.createChild("progress"); | 44 this._progressElement = this._contentElement.createChild("progress"); |
45 this._progressElement.value = 0; | 45 this._progressElement.value = 0; |
46 this._stopButton = this._contentElement.createChild("button", "progress-indi
cator-shadow-stop-button"); | 46 this._stopButton = this._contentElement.createChild("button", "progress-indi
cator-shadow-stop-button"); |
47 this._stopButton.addEventListener("click", this.cancel.bind(this)); | 47 this._stopButton.addEventListener("click", this.cancel.bind(this)); |
48 | 48 |
49 this._isCanceled = false; | 49 this._isCanceled = false; |
50 this._worked = 0; | 50 this._worked = 0; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 this.setWorked(this._worked + (worked || 1)); | 126 this.setWorked(this._worked + (worked || 1)); |
127 }, | 127 }, |
128 | 128 |
129 hideStopButton: function() | 129 hideStopButton: function() |
130 { | 130 { |
131 this._stopButton.classList.add("hidden"); | 131 this._stopButton.classList.add("hidden"); |
132 }, | 132 }, |
133 | 133 |
134 __proto__: WebInspector.Object.prototype | 134 __proto__: WebInspector.Object.prototype |
135 } | 135 } |
OLD | NEW |