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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/RequestView.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/network/RequestView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestView.js
index 3dcdb1d4488997592da2e8a8a72dfce993627908..ba005901e7bf72be6cc3fdd78e25240b987929a5 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/RequestView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/RequestView.js
@@ -27,49 +27,46 @@
* (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}
- * @param {!WebInspector.NetworkRequest} request
+ * @unrestricted
*/
-WebInspector.RequestView = function(request)
-{
- WebInspector.VBox.call(this);
+WebInspector.RequestView = class extends WebInspector.VBox {
+ /**
+ * @param {!WebInspector.NetworkRequest} request
+ */
+ constructor(request) {
+ super();
- this.element.classList.add("request-view");
+ this.element.classList.add('request-view');
this.request = request;
-};
-
-WebInspector.RequestView.prototype = {
- __proto__: WebInspector.VBox.prototype
-};
+ }
-/**
- * @param {!WebInspector.NetworkRequest} request
- * @return {boolean}
- */
-WebInspector.RequestView.hasTextContent = function(request)
-{
+ /**
+ * @param {!WebInspector.NetworkRequest} request
+ * @return {boolean}
+ */
+ static hasTextContent(request) {
if (request.resourceType().isTextType())
- return true;
+ return true;
if (request.resourceType() === WebInspector.resourceTypes.Other || request.hasErrorStatusCode())
- return !!request.content && !request.contentEncoded;
+ return !!request.content && !request.contentEncoded;
return false;
-};
+ }
-/**
- * @param {!WebInspector.NetworkRequest} request
- * @return {!WebInspector.Widget}
- */
-WebInspector.RequestView.nonSourceViewForRequest = function(request)
-{
+ /**
+ * @param {!WebInspector.NetworkRequest} request
+ * @return {!WebInspector.Widget}
+ */
+ static nonSourceViewForRequest(request) {
switch (request.resourceType()) {
- case WebInspector.resourceTypes.Image:
+ case WebInspector.resourceTypes.Image:
return new WebInspector.ImageView(request.mimeType, request);
- case WebInspector.resourceTypes.Font:
+ case WebInspector.resourceTypes.Font:
return new WebInspector.FontView(request.mimeType, request);
- default:
+ default:
return new WebInspector.RequestView(request);
}
+ }
};
+
+

Powered by Google App Engine
This is Rietveld 408576698