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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionServer.js

Issue 2758963002: [DevTools] Remove dependency from TargetManager to ResourceTreeModel (Closed)
Patch Set: review comments addressed Created 3 years, 9 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 {command: 'open-resource', resource: this._makeResource(contentProvider) , lineNumber: lineNumber + 1}); 415 {command: 'open-resource', resource: this._makeResource(contentProvider) , lineNumber: lineNumber + 1});
416 } 416 }
417 417
418 _onReload(message) { 418 _onReload(message) {
419 var options = /** @type {!ExtensionReloadOptions} */ (message.options || {}) ; 419 var options = /** @type {!ExtensionReloadOptions} */ (message.options || {}) ;
420 420
421 SDK.multitargetNetworkManager.setUserAgentOverride(typeof options.userAgent === 'string' ? options.userAgent : ''); 421 SDK.multitargetNetworkManager.setUserAgentOverride(typeof options.userAgent === 'string' ? options.userAgent : '');
422 var injectedScript; 422 var injectedScript;
423 if (options.injectedScript) 423 if (options.injectedScript)
424 injectedScript = '(function(){' + options.injectedScript + '})()'; 424 injectedScript = '(function(){' + options.injectedScript + '})()';
425 SDK.targetManager.reloadPage(!!options.ignoreCache, injectedScript); 425 SDK.ResourceTreeModel.reloadAllPages(!!options.ignoreCache, injectedScript);
426 return this._status.OK(); 426 return this._status.OK();
427 } 427 }
428 428
429 _onEvaluateOnInspectedPage(message, port) { 429 _onEvaluateOnInspectedPage(message, port) {
430 /** 430 /**
431 * @param {?Protocol.Error} error 431 * @param {?Protocol.Error} error
432 * @param {?SDK.RemoteObject} remoteObject 432 * @param {?SDK.RemoteObject} remoteObject
433 * @param {boolean=} wasThrown 433 * @param {boolean=} wasThrown
434 * @this {Extensions.ExtensionServer} 434 * @this {Extensions.ExtensionServer}
435 */ 435 */
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 /** 1044 /**
1045 * @typedef {{code: string, description: string, details: !Array.<*>}} 1045 * @typedef {{code: string, description: string, details: !Array.<*>}}
1046 */ 1046 */
1047 Extensions.ExtensionStatus.Record; 1047 Extensions.ExtensionStatus.Record;
1048 1048
1049 Extensions.extensionAPI = {}; 1049 Extensions.extensionAPI = {};
1050 defineCommonExtensionSymbols(Extensions.extensionAPI); 1050 defineCommonExtensionSymbols(Extensions.extensionAPI);
1051 1051
1052 /** @type {!Extensions.ExtensionServer} */ 1052 /** @type {!Extensions.ExtensionServer} */
1053 Extensions.extensionServer; 1053 Extensions.extensionServer;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698