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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/LiveLocation.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/bindings/LiveLocation.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/LiveLocation.js b/third_party/WebKit/Source/devtools/front_end/bindings/LiveLocation.js
index 85e252788f7c35e5898df97d56eb97f3188b8661..6e68454d4c1e08cf7555f3a0f944a5ab8d4c8af6 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/LiveLocation.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/LiveLocation.js
@@ -1,104 +1,96 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
/** @interface */
WebInspector.LiveLocation = function() {};
WebInspector.LiveLocation.prototype = {
- update: function() {},
+ update: function() {},
- /**
- * @return {?WebInspector.UILocation}
- */
- uiLocation: function() {},
+ /**
+ * @return {?WebInspector.UILocation}
+ */
+ uiLocation: function() {},
- dispose: function() {},
+ dispose: function() {},
- /**
- * @return {boolean}
- */
- isBlackboxed: function() {}
+ /**
+ * @return {boolean}
+ */
+ isBlackboxed: function() {}
};
/**
- * @constructor
* @implements {WebInspector.LiveLocation}
- * @param {function(!WebInspector.LiveLocation)} updateDelegate
- * @param {!WebInspector.LiveLocationPool} locationPool
+ * @unrestricted
*/
-WebInspector.LiveLocationWithPool = function(updateDelegate, locationPool)
-{
+WebInspector.LiveLocationWithPool = class {
+ /**
+ * @param {function(!WebInspector.LiveLocation)} updateDelegate
+ * @param {!WebInspector.LiveLocationPool} locationPool
+ */
+ constructor(updateDelegate, locationPool) {
this._updateDelegate = updateDelegate;
this._locationPool = locationPool;
this._locationPool._add(this);
-};
+ }
-WebInspector.LiveLocationWithPool.prototype = {
- /**
- * @override
- */
- update: function()
- {
- this._updateDelegate(this);
- },
+ /**
+ * @override
+ */
+ update() {
+ this._updateDelegate(this);
+ }
- /**
- * @override
- * @return {?WebInspector.UILocation}
- */
- uiLocation: function()
- {
- throw "Not implemented";
- },
+ /**
+ * @override
+ * @return {?WebInspector.UILocation}
+ */
+ uiLocation() {
+ throw 'Not implemented';
+ }
- /**
- * @override
- */
- dispose: function()
- {
- this._locationPool._delete(this);
- this._updateDelegate = null;
- },
+ /**
+ * @override
+ */
+ dispose() {
+ this._locationPool._delete(this);
+ this._updateDelegate = null;
+ }
- /**
- * @override
- * @return {boolean}
- */
- isBlackboxed: function()
- {
- throw "Not implemented";
- }
+ /**
+ * @override
+ * @return {boolean}
+ */
+ isBlackboxed() {
+ throw 'Not implemented';
+ }
};
/**
- * @constructor
+ * @unrestricted
*/
-WebInspector.LiveLocationPool = function()
-{
+WebInspector.LiveLocationPool = class {
+ constructor() {
this._locations = new Set();
-};
+ }
-WebInspector.LiveLocationPool.prototype = {
- /**
- * @param {!WebInspector.LiveLocation} location
- */
- _add: function(location)
- {
- this._locations.add(location);
- },
+ /**
+ * @param {!WebInspector.LiveLocation} location
+ */
+ _add(location) {
+ this._locations.add(location);
+ }
- /**
- * @param {!WebInspector.LiveLocation} location
- */
- _delete: function(location)
- {
- this._locations.delete(location);
- },
+ /**
+ * @param {!WebInspector.LiveLocation} location
+ */
+ _delete(location) {
+ this._locations.delete(location);
+ }
- disposeAll: function()
- {
- for (var location of this._locations)
- location.dispose();
- }
+ disposeAll() {
+ for (var location of this._locations)
+ location.dispose();
+ }
};

Powered by Google App Engine
This is Rietveld 408576698