| 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.RequestContentView} | 33 * @extends {WebInspector.RequestContentView} |
| 34 * @param {!WebInspector.NetworkRequest} request | 34 * @param {!WebInspector.NetworkRequest} request |
| 35 * @param {!WebInspector.Widget} responseView | 35 * @param {!WebInspector.Widget} responseView |
| 36 */ | 36 */ |
| 37 WebInspector.RequestPreviewView = function(request, responseView) | 37 WebInspector.RequestPreviewView = function(request, responseView) |
| 38 { | 38 { |
| 39 WebInspector.RequestContentView.call(this, request); | 39 WebInspector.RequestContentView.call(this, request); |
| 40 this._responseView = responseView; | 40 this._responseView = responseView; |
| 41 /** @type {?WebInspector.Widget} */ | 41 /** @type {?WebInspector.Widget} */ |
| 42 this._previewView = null; | 42 this._previewView = null; |
| 43 } | 43 }; |
| 44 | 44 |
| 45 WebInspector.RequestPreviewView.prototype = { | 45 WebInspector.RequestPreviewView.prototype = { |
| 46 contentLoaded: function() | 46 contentLoaded: function() |
| 47 { | 47 { |
| 48 if (!this.request.content && !this.request.contentError()) { | 48 if (!this.request.content && !this.request.contentError()) { |
| 49 if (!this._emptyWidget) { | 49 if (!this._emptyWidget) { |
| 50 this._emptyWidget = this._createEmptyWidget(); | 50 this._emptyWidget = this._createEmptyWidget(); |
| 51 this._emptyWidget.show(this.element); | 51 this._emptyWidget.show(this.element); |
| 52 this._previewView = this._emptyWidget; | 52 this._previewView = this._emptyWidget; |
| 53 } | 53 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 return this._responseView.sourceView; | 189 return this._responseView.sourceView; |
| 190 | 190 |
| 191 if (this.request.resourceType() === WebInspector.resourceTypes.Other
) | 191 if (this.request.resourceType() === WebInspector.resourceTypes.Other
) |
| 192 return this._createEmptyWidget(); | 192 return this._createEmptyWidget(); |
| 193 | 193 |
| 194 return WebInspector.RequestView.nonSourceViewForRequest(this.request
); | 194 return WebInspector.RequestView.nonSourceViewForRequest(this.request
); |
| 195 } | 195 } |
| 196 }, | 196 }, |
| 197 | 197 |
| 198 __proto__: WebInspector.RequestContentView.prototype | 198 __proto__: WebInspector.RequestContentView.prototype |
| 199 } | 199 }; |
| OLD | NEW |