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

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

Issue 667743002: DevTools: remove "type" getters in Resource and NetworkRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 if (this._sourceView || !WebInspector.RequestView.hasTextContent(this.re quest)) 46 if (this._sourceView || !WebInspector.RequestView.hasTextContent(this.re quest))
47 return this._sourceView; 47 return this._sourceView;
48 48
49 var contentProvider = new WebInspector.RequestResponseView.ContentProvid er(this.request); 49 var contentProvider = new WebInspector.RequestResponseView.ContentProvid er(this.request);
50 if (this.request.resourceSize >= WebInspector.RequestResponseView._maxFo rmattedResourceSize) { 50 if (this.request.resourceSize >= WebInspector.RequestResponseView._maxFo rmattedResourceSize) {
51 this._sourceView = new WebInspector.ResourceSourceFrameFallback(cont entProvider); 51 this._sourceView = new WebInspector.ResourceSourceFrameFallback(cont entProvider);
52 return this._sourceView; 52 return this._sourceView;
53 } 53 }
54 54
55 var sourceFrame = new WebInspector.ResourceSourceFrame(contentProvider); 55 var sourceFrame = new WebInspector.ResourceSourceFrame(contentProvider);
56 sourceFrame.setHighlighterType(this.request.type.canonicalMimeType() || 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.EmptyView}
64 */ 64 */
65 _createMessageView: function(message) 65 _createMessageView: function(message)
66 { 66 {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 contentURL: function() 112 contentURL: function()
113 { 113 {
114 return this._request.contentURL(); 114 return this._request.contentURL();
115 }, 115 },
116 116
117 /** 117 /**
118 * @return {!WebInspector.ResourceType} 118 * @return {!WebInspector.ResourceType}
119 */ 119 */
120 contentType: function() 120 contentType: function()
121 { 121 {
122 return this._request.contentType(); 122 return this._request.resourceType();
123 }, 123 },
124 124
125 /** 125 /**
126 * @param {function(?string)} callback 126 * @param {function(?string)} callback
127 */ 127 */
128 requestContent: function(callback) 128 requestContent: function(callback)
129 { 129 {
130 /** 130 /**
131 * @param {?string} content 131 * @param {?string} content
132 * @this {WebInspector.RequestResponseView.ContentProvider} 132 * @this {WebInspector.RequestResponseView.ContentProvider}
(...skipping 10 matching lines...) Expand all
143 * @param {string} query 143 * @param {string} query
144 * @param {boolean} caseSensitive 144 * @param {boolean} caseSensitive
145 * @param {boolean} isRegex 145 * @param {boolean} isRegex
146 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 146 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
147 */ 147 */
148 searchInContent: function(query, caseSensitive, isRegex, callback) 148 searchInContent: function(query, caseSensitive, isRegex, callback)
149 { 149 {
150 this._request.searchInContent(query, caseSensitive, isRegex, callback); 150 this._request.searchInContent(query, caseSensitive, isRegex, callback);
151 } 151 }
152 } 152 }
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