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

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

Issue 2536273003: [DevTools] Remove Workspace.projectTypes enum part1. (Closed)
Patch Set: Created 4 years 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 /** @type {!Map<string, !Common.ContentProvider>} */ 453 /** @type {!Map<string, !Common.ContentProvider>} */
454 var resources = new Map(); 454 var resources = new Map();
455 455
456 /** 456 /**
457 * @this {Extensions.ExtensionServer} 457 * @this {Extensions.ExtensionServer}
458 */ 458 */
459 function pushResourceData(contentProvider) { 459 function pushResourceData(contentProvider) {
460 if (!resources.has(contentProvider.contentURL())) 460 if (!resources.has(contentProvider.contentURL()))
461 resources.set(contentProvider.contentURL(), this._makeResource(contentPr ovider)); 461 resources.set(contentProvider.contentURL(), this._makeResource(contentPr ovider));
462 } 462 }
463 var uiSourceCodes = Workspace.workspace.uiSourceCodesForProjectType(Workspac e.projectTypes.Network); 463 var uiSourceCodes = Bindings.NetworkProject.uiSourceCodes(Workspace.workspac e);
464 uiSourceCodes =
465 uiSourceCodes.concat(Workspace.workspace.uiSourceCodesForProjectType(Wor kspace.projectTypes.ContentScripts));
466 uiSourceCodes.forEach(pushResourceData.bind(this)); 464 uiSourceCodes.forEach(pushResourceData.bind(this));
467 for (var target of SDK.targetManager.targets(SDK.Target.Capability.DOM)) 465 for (var target of SDK.targetManager.targets(SDK.Target.Capability.DOM))
468 SDK.ResourceTreeModel.fromTarget(target).forAllResources(pushResourceData. bind(this)); 466 SDK.ResourceTreeModel.fromTarget(target).forAllResources(pushResourceData. bind(this));
469 return resources.valuesArray(); 467 return resources.valuesArray();
470 } 468 }
471 469
472 /** 470 /**
473 * @param {!Common.ContentProvider} contentProvider 471 * @param {!Common.ContentProvider} contentProvider
474 * @param {!Object} message 472 * @param {!Object} message
475 * @param {!MessagePort} port 473 * @param {!MessagePort} port
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 /** 1031 /**
1034 * @typedef {{code: string, description: string, details: !Array.<*>}} 1032 * @typedef {{code: string, description: string, details: !Array.<*>}}
1035 */ 1033 */
1036 Extensions.ExtensionStatus.Record; 1034 Extensions.ExtensionStatus.Record;
1037 1035
1038 Extensions.extensionAPI = {}; 1036 Extensions.extensionAPI = {};
1039 defineCommonExtensionSymbols(Extensions.extensionAPI); 1037 defineCommonExtensionSymbols(Extensions.extensionAPI);
1040 1038
1041 /** @type {!Extensions.ExtensionServer} */ 1039 /** @type {!Extensions.ExtensionServer} */
1042 Extensions.extensionServer; 1040 Extensions.extensionServer;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698