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

Side by Side Diff: Source/devtools/front_end/network/RequestResponseView.js

Issue 1113813002: [DevTools] Rename View to Widget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 7 months 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 var sourceFrame = new WebInspector.ResourceSourceFrame(contentProvider); 55 var sourceFrame = new WebInspector.ResourceSourceFrame(contentProvider);
56 sourceFrame.setHighlighterType(this.request.resourceType().canonicalMime Type() || this.request.mimeType); 56 sourceFrame.setHighlighterType(this.request.resourceType().canonicalMime Type() || this.request.mimeType);
57 this._sourceView = sourceFrame; 57 this._sourceView = sourceFrame;
58 return this._sourceView; 58 return this._sourceView;
59 }, 59 },
60 60
61 /** 61 /**
62 * @param {string} message 62 * @param {string} message
63 * @return {!WebInspector.EmptyView} 63 * @return {!WebInspector.EmptyWidget}
64 */ 64 */
65 _createMessageView: function(message) 65 _createMessageView: function(message)
66 { 66 {
67 return new WebInspector.EmptyView(message); 67 return new WebInspector.EmptyWidget(message);
68 }, 68 },
69 69
70 contentLoaded: function() 70 contentLoaded: function()
71 { 71 {
72 if ((!this.request.content || !this.sourceView) && !this.request.content Error()) { 72 if ((!this.request.content || !this.sourceView) && !this.request.content Error()) {
73 if (!this._emptyView) { 73 if (!this._emptyWidget) {
74 this._emptyView = this._createMessageView(WebInspector.UIString( "This request has no response data available.")); 74 this._emptyWidget = this._createMessageView(WebInspector.UIStrin g("This request has no response data available."));
75 this._emptyView.show(this.element); 75 this._emptyWidget.show(this.element);
76 this.innerView = this._emptyView; 76 this.innerView = this._emptyWidget;
77 } 77 }
78 } else { 78 } else {
79 if (this._emptyView) { 79 if (this._emptyWidget) {
80 this._emptyView.detach(); 80 this._emptyWidget.detach();
81 delete this._emptyView; 81 delete this._emptyWidget;
82 } 82 }
83 83
84 if (this.request.content && this.sourceView) { 84 if (this.request.content && this.sourceView) {
85 this.sourceView.show(this.element); 85 this.sourceView.show(this.element);
86 this.innerView = this.sourceView; 86 this.innerView = this.sourceView;
87 } else { 87 } else {
88 if (!this._errorView) 88 if (!this._errorView)
89 this._errorView = this._createMessageView(WebInspector.UIStr ing("Failed to load response data")); 89 this._errorView = this._createMessageView(WebInspector.UIStr ing("Failed to load response data"));
90 this._errorView.show(this.element); 90 this._errorView.show(this.element);
91 this.innerView = this._errorView; 91 this.innerView = this._errorView;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 * @param {string} query 147 * @param {string} query
148 * @param {boolean} caseSensitive 148 * @param {boolean} caseSensitive
149 * @param {boolean} isRegex 149 * @param {boolean} isRegex
150 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 150 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
151 */ 151 */
152 searchInContent: function(query, caseSensitive, isRegex, callback) 152 searchInContent: function(query, caseSensitive, isRegex, callback)
153 { 153 {
154 this._request.searchInContent(query, caseSensitive, isRegex, callback); 154 this._request.searchInContent(query, caseSensitive, isRegex, callback);
155 } 155 }
156 } 156 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/network/RequestPreviewView.js ('k') | Source/devtools/front_end/network/RequestView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698