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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: all done Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js b/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
index 4a74ea42865e4543a28ed9e0b7eee2031d4f6678..8ae0ec07e6eb7fc865bcd4618e3eb7df393d9ff9 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js
@@ -27,33 +27,28 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
/**
- * @constructor
- * @extends {WebInspector.VBox}
+ * @unrestricted
*/
-WebInspector.EmptyWidget = function(text)
-{
- WebInspector.VBox.call(this);
- this.registerRequiredCSS("ui/emptyWidget.css");
- this.element.classList.add("empty-view");
- this.textElement = this.element.createChild("span");
+WebInspector.EmptyWidget = class extends WebInspector.VBox {
+ constructor(text) {
+ super();
+ this.registerRequiredCSS('ui/emptyWidget.css');
+ this.element.classList.add('empty-view');
+ this.textElement = this.element.createChild('span');
this._text = text;
-};
-
-WebInspector.EmptyWidget.prototype = {
- wasShown: function()
- {
- this.textElement.textContent = this._text;
- },
+ }
- set text(text)
- {
- this._text = text;
- if (this.isShowing())
- this.textElement.textContent = this._text;
- },
+ /**
+ * @override
+ */
+ wasShown() {
+ this.textElement.textContent = this._text;
+ }
- __proto__: WebInspector.VBox.prototype
+ set text(text) {
+ this._text = text;
+ if (this.isShowing())
+ this.textElement.textContent = this._text;
+ }
};
-

Powered by Google App Engine
This is Rietveld 408576698