| 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 * Copyright (C) IBM Corp. 2009 All rights reserved. | 3 * Copyright (C) IBM Corp. 2009 All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * @extends {WebInspector.SourceFrame} | 31 * @extends {WebInspector.SourceFrame} |
| 32 * @constructor | 32 * @constructor |
| 33 * @param {!WebInspector.ContentProvider} resource | 33 * @param {!WebInspector.ContentProvider} resource |
| 34 */ | 34 */ |
| 35 WebInspector.ResourceSourceFrame = function(resource) | 35 WebInspector.ResourceSourceFrame = function(resource) |
| 36 { | 36 { |
| 37 this._resource = resource; | 37 this._resource = resource; |
| 38 WebInspector.SourceFrame.call(this, resource.contentURL(), resource.requestC
ontent.bind(resource)); | 38 WebInspector.SourceFrame.call(this, resource.contentURL(), resource.requestC
ontent.bind(resource)); |
| 39 } | 39 }; |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * @param {!WebInspector.ContentProvider} resource | 42 * @param {!WebInspector.ContentProvider} resource |
| 43 * @param {string} highlighterType | 43 * @param {string} highlighterType |
| 44 * @return {!WebInspector.SearchableView} | 44 * @return {!WebInspector.SearchableView} |
| 45 */ | 45 */ |
| 46 WebInspector.ResourceSourceFrame.createSearchableView = function(resource, highl
ighterType) | 46 WebInspector.ResourceSourceFrame.createSearchableView = function(resource, highl
ighterType) |
| 47 { | 47 { |
| 48 var sourceFrame = new WebInspector.ResourceSourceFrame(resource); | 48 var sourceFrame = new WebInspector.ResourceSourceFrame(resource); |
| 49 sourceFrame.setHighlighterType(highlighterType); | 49 sourceFrame.setHighlighterType(highlighterType); |
| 50 var searchableView = new WebInspector.SearchableView(sourceFrame); | 50 var searchableView = new WebInspector.SearchableView(sourceFrame); |
| 51 searchableView.setPlaceholder(WebInspector.UIString("Find")); | 51 searchableView.setPlaceholder(WebInspector.UIString("Find")); |
| 52 sourceFrame.show(searchableView.element); | 52 sourceFrame.show(searchableView.element); |
| 53 sourceFrame.setSearchableView(searchableView); | 53 sourceFrame.setSearchableView(searchableView); |
| 54 return searchableView; | 54 return searchableView; |
| 55 } | 55 }; |
| 56 | 56 |
| 57 WebInspector.ResourceSourceFrame.prototype = { | 57 WebInspector.ResourceSourceFrame.prototype = { |
| 58 get resource() | 58 get resource() |
| 59 { | 59 { |
| 60 return this._resource; | 60 return this._resource; |
| 61 }, | 61 }, |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * @override | 64 * @override |
| 65 * @param {!WebInspector.ContextMenu} contextMenu | 65 * @param {!WebInspector.ContextMenu} contextMenu |
| 66 * @param {number} lineNumber | 66 * @param {number} lineNumber |
| 67 * @param {number} columnNumber | 67 * @param {number} columnNumber |
| 68 * @return {!Promise} | 68 * @return {!Promise} |
| 69 */ | 69 */ |
| 70 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) | 70 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) |
| 71 { | 71 { |
| 72 contextMenu.appendApplicableItems(this._resource); | 72 contextMenu.appendApplicableItems(this._resource); |
| 73 return Promise.resolve(); | 73 return Promise.resolve(); |
| 74 }, | 74 }, |
| 75 | 75 |
| 76 __proto__: WebInspector.SourceFrame.prototype | 76 __proto__: WebInspector.SourceFrame.prototype |
| 77 } | 77 }; |
| OLD | NEW |