OLD | NEW |
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 22 matching lines...) Expand all Loading... |
33 * @extends {WebInspector.VBox} | 33 * @extends {WebInspector.VBox} |
34 * @param {!WebInspector.NetworkRequest} request | 34 * @param {!WebInspector.NetworkRequest} request |
35 */ | 35 */ |
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 wasShown: function() | 46 wasShown: function() |
47 { | 47 { |
48 this._request.addEventListener(WebInspector.NetworkRequest.Events.Reques
tHeadersChanged, this._refreshCookies, this); | 48 this._request.addEventListener(WebInspector.NetworkRequest.Events.Reques
tHeadersChanged, this._refreshCookies, this); |
49 this._request.addEventListener(WebInspector.NetworkRequest.Events.Respon
seHeadersChanged, this._refreshCookies, this); | 49 this._request.addEventListener(WebInspector.NetworkRequest.Events.Respon
seHeadersChanged, this._refreshCookies, this); |
50 | 50 |
51 if (!this._gotCookies) { | 51 if (!this._gotCookies) { |
52 if (!this._emptyWidget) { | 52 if (!this._emptyWidget) { |
53 this._emptyWidget = new WebInspector.EmptyWidget(WebInspector.UI
String("This request has no cookies.")); | 53 this._emptyWidget = new WebInspector.EmptyWidget(WebInspector.UI
String("This request has no cookies.")); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 _refreshCookies: function() | 86 _refreshCookies: function() |
87 { | 87 { |
88 delete this._cookiesTable; | 88 delete this._cookiesTable; |
89 if (!this._gotCookies || !this.isShowing()) | 89 if (!this._gotCookies || !this.isShowing()) |
90 return; | 90 return; |
91 this._buildCookiesTable(); | 91 this._buildCookiesTable(); |
92 }, | 92 }, |
93 | 93 |
94 __proto__: WebInspector.VBox.prototype | 94 __proto__: WebInspector.VBox.prototype |
95 } | 95 }; |
OLD | NEW |