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

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

Issue 2749043005: [DevTools] Make NetworkLog a singleton, and not an SDKModel (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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 Common.Revealer.reveal(uiSourceCode.uiLocation(message.lineNumber, 0)); 386 Common.Revealer.reveal(uiSourceCode.uiLocation(message.lineNumber, 0));
387 return this._status.OK(); 387 return this._status.OK();
388 } 388 }
389 389
390 var resource = Bindings.resourceForURL(message.url); 390 var resource = Bindings.resourceForURL(message.url);
391 if (resource) { 391 if (resource) {
392 Common.Revealer.reveal(resource); 392 Common.Revealer.reveal(resource);
393 return this._status.OK(); 393 return this._status.OK();
394 } 394 }
395 395
396 var request = SDK.NetworkLog.requestForURL(message.url); 396 var request = SDK.networkLog.requestForURL(message.url);
397 if (request) { 397 if (request) {
398 Common.Revealer.reveal(request); 398 Common.Revealer.reveal(request);
399 return this._status.OK(); 399 return this._status.OK();
400 } 400 }
401 401
402 return this._status.E_NOTFOUND(message.url); 402 return this._status.E_NOTFOUND(message.url);
403 } 403 }
404 404
405 _onSetOpenResourceHandler(message, port) { 405 _onSetOpenResourceHandler(message, port) {
406 var name = this._registeredExtensions[port._extensionOrigin].name || ('Exten sion ' + port._extensionOrigin); 406 var name = this._registeredExtensions[port._extensionOrigin].name || ('Exten sion ' + port._extensionOrigin);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 else 442 else
443 result = {value: remoteObject.value}; 443 result = {value: remoteObject.value};
444 444
445 this._dispatchCallback(message.requestId, port, result); 445 this._dispatchCallback(message.requestId, port, result);
446 } 446 }
447 return this.evaluate( 447 return this.evaluate(
448 message.expression, true, true, message.evaluateOptions, port._extension Origin, callback.bind(this)); 448 message.expression, true, true, message.evaluateOptions, port._extension Origin, callback.bind(this));
449 } 449 }
450 450
451 _onGetHAR() { 451 _onGetHAR() {
452 var requests = SDK.NetworkLog.requests(); 452 var requests = SDK.networkLog.requests();
453 var harLog = (new SDK.HARLog(requests)).build(); 453 var harLog = (new SDK.HARLog(requests)).build();
454 for (var i = 0; i < harLog.entries.length; ++i) 454 for (var i = 0; i < harLog.entries.length; ++i)
455 harLog.entries[i]._requestId = this._requestId(requests[i]); 455 harLog.entries[i]._requestId = this._requestId(requests[i]);
456 return harLog; 456 return harLog;
457 } 457 }
458 458
459 /** 459 /**
460 * @param {!Common.ContentProvider} contentProvider 460 * @param {!Common.ContentProvider} contentProvider
461 */ 461 */
462 _makeResource(contentProvider) { 462 _makeResource(contentProvider) {
(...skipping 581 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