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

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

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: all done 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/source_frame/ResourceSourceFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/ResourceSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/source_frame/ResourceSourceFrame.js
index 378c2bc06f0c72ca646c777e41be1f19e66eb38d..4b708354aa82ec3ebe7880cb0054e6658850f142 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/ResourceSourceFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/ResourceSourceFrame.js
@@ -26,52 +26,48 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
/**
- * @extends {WebInspector.SourceFrame}
- * @constructor
- * @param {!WebInspector.ContentProvider} resource
+ * @unrestricted
*/
-WebInspector.ResourceSourceFrame = function(resource)
-{
- WebInspector.SourceFrame.call(this, resource.contentURL(), resource.requestContent.bind(resource));
+WebInspector.ResourceSourceFrame = class extends WebInspector.SourceFrame {
+ /**
+ * @param {!WebInspector.ContentProvider} resource
+ */
+ constructor(resource) {
+ super(resource.contentURL(), resource.requestContent.bind(resource));
this._resource = resource;
-};
+ }
-/**
- * @param {!WebInspector.ContentProvider} resource
- * @param {string} highlighterType
- * @return {!WebInspector.SearchableView}
- */
-WebInspector.ResourceSourceFrame.createSearchableView = function(resource, highlighterType)
-{
+ /**
+ * @param {!WebInspector.ContentProvider} resource
+ * @param {string} highlighterType
+ * @return {!WebInspector.SearchableView}
+ */
+ static createSearchableView(resource, highlighterType) {
var sourceFrame = new WebInspector.ResourceSourceFrame(resource);
sourceFrame.setHighlighterType(highlighterType);
var searchableView = new WebInspector.SearchableView(sourceFrame);
- searchableView.setPlaceholder(WebInspector.UIString("Find"));
+ searchableView.setPlaceholder(WebInspector.UIString('Find'));
sourceFrame.show(searchableView.element);
sourceFrame.setSearchableView(searchableView);
return searchableView;
-};
-
-WebInspector.ResourceSourceFrame.prototype = {
- get resource()
- {
- return this._resource;
- },
+ }
- /**
- * @override
- * @param {!WebInspector.ContextMenu} contextMenu
- * @param {number} lineNumber
- * @param {number} columnNumber
- * @return {!Promise}
- */
- populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber)
- {
- contextMenu.appendApplicableItems(this._resource);
- return Promise.resolve();
- },
+ get resource() {
+ return this._resource;
+ }
- __proto__: WebInspector.SourceFrame.prototype
+ /**
+ * @override
+ * @param {!WebInspector.ContextMenu} contextMenu
+ * @param {number} lineNumber
+ * @param {number} columnNumber
+ * @return {!Promise}
+ */
+ populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber) {
+ contextMenu.appendApplicableItems(this._resource);
+ return Promise.resolve();
+ }
};
+
+

Powered by Google App Engine
This is Rietveld 408576698