| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.VBox} | 33 * @extends {WebInspector.VBox} |
| 34 * @param {!WebInspector.FileSystemModel.File} file | 34 * @param {!WebInspector.FileSystemModel.File} file |
| 35 */ | 35 */ |
| 36 WebInspector.FileContentView = function(file) | 36 WebInspector.FileContentView = function(file) |
| 37 { | 37 { |
| 38 WebInspector.VBox.call(this); | 38 WebInspector.VBox.call(this); |
| 39 | 39 |
| 40 this._innerView = /** @type {?WebInspector.View} */ (null); | 40 this._innerView = /** @type {?WebInspector.Widget} */ (null); |
| 41 this._file = file; | 41 this._file = file; |
| 42 this._content = null; | 42 this._content = null; |
| 43 } | 43 } |
| 44 | 44 |
| 45 WebInspector.FileContentView.prototype = { | 45 WebInspector.FileContentView.prototype = { |
| 46 wasShown: function() | 46 wasShown: function() |
| 47 { | 47 { |
| 48 if (!this._innerView) { | 48 if (!this._innerView) { |
| 49 if (this._file.isTextFile) | 49 if (this._file.isTextFile) |
| 50 this._innerView = new WebInspector.EmptyView(""); | 50 this._innerView = new WebInspector.EmptyWidget(""); |
| 51 else | 51 else |
| 52 this._innerView = new WebInspector.EmptyView(WebInspector.UIStri
ng("Binary File")); | 52 this._innerView = new WebInspector.EmptyWidget(WebInspector.UISt
ring("Binary File")); |
| 53 this.refresh(); | 53 this.refresh(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 this._innerView.show(this.element); | 56 this._innerView.show(this.element); |
| 57 }, | 57 }, |
| 58 | 58 |
| 59 /** | 59 /** |
| 60 * @param {number} errorCode | 60 * @param {number} errorCode |
| 61 * @param {!FileSystemAgent.Metadata} metadata | 61 * @param {!FileSystemAgent.Metadata} metadata |
| 62 */ | 62 */ |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 * @return {boolean} | 168 * @return {boolean} |
| 169 */ | 169 */ |
| 170 updateMetadata: function(metadata) | 170 updateMetadata: function(metadata) |
| 171 { | 171 { |
| 172 if (this._metadata.modificationTime >= metadata.modificationTime) | 172 if (this._metadata.modificationTime >= metadata.modificationTime) |
| 173 return false; | 173 return false; |
| 174 this._metadata = metadata.modificationTime; | 174 this._metadata = metadata.modificationTime; |
| 175 return true; | 175 return true; |
| 176 } | 176 } |
| 177 } | 177 } |
| OLD | NEW |