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

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

Issue 1419813005: DevTools: always use CodeMirror for response preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 * @return {!Promise} 52 * @return {!Promise}
53 */ 53 */
54 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) 54 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber)
55 { 55 {
56 contextMenu.appendApplicableItems(this._resource); 56 contextMenu.appendApplicableItems(this._resource);
57 return Promise.resolve(); 57 return Promise.resolve();
58 }, 58 },
59 59
60 __proto__: WebInspector.SourceFrame.prototype 60 __proto__: WebInspector.SourceFrame.prototype
61 } 61 }
62
63 /**
64 * @constructor
65 * @extends {WebInspector.VBox}
66 * @param {!WebInspector.ContentProvider} resource
67 */
68 WebInspector.ResourceSourceFrameFallback = function(resource)
69 {
70 WebInspector.VBox.call(this);
71 this.registerRequiredCSS("source_frame/resourceSourceFrame.css");
72 this._resource = resource;
73 this._content = this.element.createChild("div", "resource-source-frame-fallb ack monospace");
74 }
75
76 WebInspector.ResourceSourceFrameFallback.prototype = {
77 wasShown: function()
78 {
79 if (!this._contentRequested) {
80 this._contentRequested = true;
81 this._resource.requestContent(this._contentLoaded.bind(this));
82 }
83 },
84
85 /**
86 * @param {?string} content
87 */
88 _contentLoaded: function(content)
89 {
90 this._content.textContent = content;
91 },
92
93 __proto__: WebInspector.VBox.prototype
94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698