OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 if (this._container) | 55 if (this._container) |
56 return; | 56 return; |
57 | 57 |
58 var imageContainer = this.element.createChild("div", "image"); | 58 var imageContainer = this.element.createChild("div", "image"); |
59 var imagePreviewElement = imageContainer.createChild("img", "resource-im
age-view"); | 59 var imagePreviewElement = imageContainer.createChild("img", "resource-im
age-view"); |
60 imagePreviewElement.addEventListener("contextmenu", this._contextMenu.bi
nd(this), true); | 60 imagePreviewElement.addEventListener("contextmenu", this._contextMenu.bi
nd(this), true); |
61 | 61 |
62 this._container = this.element.createChild("div", "info"); | 62 this._container = this.element.createChild("div", "info"); |
63 this._container.createChild("h1", "title").textContent = this._parsedURL
.displayName; | 63 this._container.createChild("h1", "title").textContent = this._parsedURL
.displayName; |
64 | 64 |
65 var infoListElement = document.createElementWithClass("dl", "infoList"); | 65 var infoListElement = createElementWithClass("dl", "infoList"); |
66 | 66 |
67 WebInspector.Resource.populateImageSource(this._url, this._mimeType, thi
s._contentProvider, imagePreviewElement); | 67 WebInspector.Resource.populateImageSource(this._url, this._mimeType, thi
s._contentProvider, imagePreviewElement); |
68 this._contentProvider.requestContent(onContentAvailable.bind(this)); | 68 this._contentProvider.requestContent(onContentAvailable.bind(this)); |
69 | 69 |
70 /** | 70 /** |
71 * @param {?string} content | 71 * @param {?string} content |
72 * @this {WebInspector.ImageView} | 72 * @this {WebInspector.ImageView} |
73 */ | 73 */ |
74 function onContentAvailable(content) | 74 function onContentAvailable(content) |
75 { | 75 { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 InspectorFrontendHost.copyText(this._url); | 125 InspectorFrontendHost.copyText(this._url); |
126 }, | 126 }, |
127 | 127 |
128 _openInNewTab: function() | 128 _openInNewTab: function() |
129 { | 129 { |
130 InspectorFrontendHost.openInNewTab(this._url); | 130 InspectorFrontendHost.openInNewTab(this._url); |
131 }, | 131 }, |
132 | 132 |
133 __proto__: WebInspector.VBox.prototype | 133 __proto__: WebInspector.VBox.prototype |
134 } | 134 } |
OLD | NEW |