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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/RequestCookiesView.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 25 matching lines...) Expand all
36 WebInspector.RequestCookiesView = function(request) 36 WebInspector.RequestCookiesView = function(request)
37 { 37 {
38 WebInspector.VBox.call(this); 38 WebInspector.VBox.call(this);
39 this.registerRequiredCSS("network/requestCookiesView.css"); 39 this.registerRequiredCSS("network/requestCookiesView.css");
40 this.element.classList.add("request-cookies-view"); 40 this.element.classList.add("request-cookies-view");
41 41
42 this._request = request; 42 this._request = request;
43 }; 43 };
44 44
45 WebInspector.RequestCookiesView.prototype = { 45 WebInspector.RequestCookiesView.prototype = {
46 /**
47 * @override
48 */
46 wasShown: function() 49 wasShown: function()
47 { 50 {
48 this._request.addEventListener(WebInspector.NetworkRequest.Events.Reques tHeadersChanged, this._refreshCookies, this); 51 this._request.addEventListener(WebInspector.NetworkRequest.Events.Reques tHeadersChanged, this._refreshCookies, this);
49 this._request.addEventListener(WebInspector.NetworkRequest.Events.Respon seHeadersChanged, this._refreshCookies, this); 52 this._request.addEventListener(WebInspector.NetworkRequest.Events.Respon seHeadersChanged, this._refreshCookies, this);
50 53
51 if (!this._gotCookies) { 54 if (!this._gotCookies) {
52 if (!this._emptyWidget) { 55 if (!this._emptyWidget) {
53 this._emptyWidget = new WebInspector.EmptyWidget(WebInspector.UI String("This request has no cookies.")); 56 this._emptyWidget = new WebInspector.EmptyWidget(WebInspector.UI String("This request has no cookies."));
54 this._emptyWidget.show(this.element); 57 this._emptyWidget.show(this.element);
55 } 58 }
56 return; 59 return;
57 } 60 }
58 61
59 if (!this._cookiesTable) 62 if (!this._cookiesTable)
60 this._buildCookiesTable(); 63 this._buildCookiesTable();
61 }, 64 },
62 65
66 /**
67 * @override
68 */
63 willHide: function() 69 willHide: function()
64 { 70 {
65 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Req uestHeadersChanged, this._refreshCookies, this); 71 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Req uestHeadersChanged, this._refreshCookies, this);
66 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Res ponseHeadersChanged, this._refreshCookies, this); 72 this._request.removeEventListener(WebInspector.NetworkRequest.Events.Res ponseHeadersChanged, this._refreshCookies, this);
67 }, 73 },
68 74
69 get _gotCookies() 75 get _gotCookies()
70 { 76 {
71 return (this._request.requestCookies && this._request.requestCookies.len gth) || (this._request.responseCookies && this._request.responseCookies.length); 77 return (this._request.requestCookies && this._request.requestCookies.len gth) || (this._request.responseCookies && this._request.responseCookies.length);
72 }, 78 },
(...skipping 13 matching lines...) Expand all
86 _refreshCookies: function() 92 _refreshCookies: function()
87 { 93 {
88 delete this._cookiesTable; 94 delete this._cookiesTable;
89 if (!this._gotCookies || !this.isShowing()) 95 if (!this._gotCookies || !this.isShowing())
90 return; 96 return;
91 this._buildCookiesTable(); 97 this._buildCookiesTable();
92 }, 98 },
93 99
94 __proto__: WebInspector.VBox.prototype 100 __proto__: WebInspector.VBox.prototype
95 }; 101 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698