Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/source_frame/ResourceSourceFrame.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12 matching lines...) Expand all
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 /** 30 /**
31 * @unrestricted 31 * @unrestricted
32 */ 32 */
33 WebInspector.ResourceSourceFrame = class extends WebInspector.SourceFrame { 33 SourceFrame.ResourceSourceFrame = class extends SourceFrame.SourceFrame {
34 /** 34 /**
35 * @param {!WebInspector.ContentProvider} resource 35 * @param {!Common.ContentProvider} resource
36 */ 36 */
37 constructor(resource) { 37 constructor(resource) {
38 super(resource.contentURL(), resource.requestContent.bind(resource)); 38 super(resource.contentURL(), resource.requestContent.bind(resource));
39 this._resource = resource; 39 this._resource = resource;
40 } 40 }
41 41
42 /** 42 /**
43 * @param {!WebInspector.ContentProvider} resource 43 * @param {!Common.ContentProvider} resource
44 * @param {string} highlighterType 44 * @param {string} highlighterType
45 * @return {!WebInspector.SearchableView} 45 * @return {!UI.SearchableView}
46 */ 46 */
47 static createSearchableView(resource, highlighterType) { 47 static createSearchableView(resource, highlighterType) {
48 var sourceFrame = new WebInspector.ResourceSourceFrame(resource); 48 var sourceFrame = new SourceFrame.ResourceSourceFrame(resource);
49 sourceFrame.setHighlighterType(highlighterType); 49 sourceFrame.setHighlighterType(highlighterType);
50 var searchableView = new WebInspector.SearchableView(sourceFrame); 50 var searchableView = new UI.SearchableView(sourceFrame);
51 searchableView.setPlaceholder(WebInspector.UIString('Find')); 51 searchableView.setPlaceholder(Common.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 get resource() { 57 get resource() {
58 return this._resource; 58 return this._resource;
59 } 59 }
60 60
61 /** 61 /**
62 * @override 62 * @override
63 * @param {!WebInspector.ContextMenu} contextMenu 63 * @param {!UI.ContextMenu} contextMenu
64 * @param {number} lineNumber 64 * @param {number} lineNumber
65 * @param {number} columnNumber 65 * @param {number} columnNumber
66 * @return {!Promise} 66 * @return {!Promise}
67 */ 67 */
68 populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber) { 68 populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber) {
69 contextMenu.appendApplicableItems(this._resource); 69 contextMenu.appendApplicableItems(this._resource);
70 return Promise.resolve(); 70 return Promise.resolve();
71 } 71 }
72 }; 72 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698