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

Side by Side Diff: webkit/glue/devtools/js/inspector_controller_impl.js

Issue 249032: DevTools: temporary fix for bug 23260 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview DevTools' implementation of the InspectorController API. 6 * @fileoverview DevTools' implementation of the InspectorController API.
7 */ 7 */
8 goog.require('devtools.InspectorController'); 8 goog.require('devtools.InspectorController');
9 9
10 goog.provide('devtools.InspectorControllerImpl'); 10 goog.provide('devtools.InspectorControllerImpl');
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 /** 118 /**
119 * {@inheritDoc}. 119 * {@inheritDoc}.
120 */ 120 */
121 devtools.InspectorControllerImpl.prototype.addResourceSourceToFrame = 121 devtools.InspectorControllerImpl.prototype.addResourceSourceToFrame =
122 function(identifier, element) { 122 function(identifier, element) {
123 var resource = WebInspector.resources[identifier]; 123 var resource = WebInspector.resources[identifier];
124 if (!resource) { 124 if (!resource) {
125 return; 125 return;
126 } 126 }
127 DevToolsHost.addResourceSourceToFrame(identifier, resource.mimeType, element); 127
128 // Temporary fix for http://crbug/23260.
129 var mimeType = resource.mimeType;
130 if (!mimeType && resource.url) {
131 if (resource.url.search('\.js$') != -1) {
132 mimeType = 'application/x-javascript';
133 } else if (resource.url.search('\.html$') != -1) {
134 mimeType = 'text/html';
135 }
136 }
137
138 DevToolsHost.addResourceSourceToFrame(identifier, mimeType, element);
128 }; 139 };
129 140
130 141
131 /** 142 /**
132 * {@inheritDoc}. 143 * {@inheritDoc}.
133 */ 144 */
134 devtools.InspectorControllerImpl.prototype.inspectedWindow = function() { 145 devtools.InspectorControllerImpl.prototype.inspectedWindow = function() {
135 return null; 146 return null;
136 }; 147 };
137 148
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 function(methodName, var_arg) { 269 function(methodName, var_arg) {
259 var args = Array.prototype.slice.call(arguments, 1); 270 var args = Array.prototype.slice.call(arguments, 1);
260 RemoteToolsAgent.DispatchOnInspectorController( 271 RemoteToolsAgent.DispatchOnInspectorController(
261 devtools.Callback.wrap(function(){}), 272 devtools.Callback.wrap(function(){}),
262 methodName, 273 methodName,
263 JSON.stringify(args)); 274 JSON.stringify(args));
264 }; 275 };
265 276
266 277
267 InspectorController = new devtools.InspectorControllerImpl(); 278 InspectorController = new devtools.InspectorControllerImpl();
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698