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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js

Issue 2537223003: [DevTools] Introduce Project.isServiceProject method. (Closed)
Patch Set: rebased 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 * @return {!Bindings.ContentProviderBasedProject} 166 * @return {!Bindings.ContentProviderBasedProject}
167 */ 167 */
168 _workspaceProject(frame, isContentScripts) { 168 _workspaceProject(frame, isContentScripts) {
169 var projectId = Bindings.NetworkProject.projectId(this.target(), frame, isCo ntentScripts); 169 var projectId = Bindings.NetworkProject.projectId(this.target(), frame, isCo ntentScripts);
170 var projectType = isContentScripts ? Workspace.projectTypes.ContentScripts : Workspace.projectTypes.Network; 170 var projectType = isContentScripts ? Workspace.projectTypes.ContentScripts : Workspace.projectTypes.Network;
171 171
172 var project = this._workspaceProjects.get(projectId); 172 var project = this._workspaceProjects.get(projectId);
173 if (project) 173 if (project)
174 return project; 174 return project;
175 175
176 project = new Bindings.ContentProviderBasedProject(this._workspace, projectI d, projectType, ''); 176 project = new Bindings.ContentProviderBasedProject(
177 this._workspace, projectId, projectType, '', false /* isServiceProject * /);
177 project[Bindings.NetworkProject._targetSymbol] = this.target(); 178 project[Bindings.NetworkProject._targetSymbol] = this.target();
178 project[Bindings.NetworkProject._frameSymbol] = frame; 179 project[Bindings.NetworkProject._frameSymbol] = frame;
179 this._workspaceProjects.set(projectId, project); 180 this._workspaceProjects.set(projectId, project);
180 return project; 181 return project;
181 } 182 }
182 183
183 /** 184 /**
184 * @param {!Common.ContentProvider} contentProvider 185 * @param {!Common.ContentProvider} contentProvider
185 * @param {?SDK.ResourceTreeFrame} frame 186 * @param {?SDK.ResourceTreeFrame} frame
186 * @param {boolean} isContentScript 187 * @param {boolean} isContentScript
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 return workspace.uiSourceCode(Bindings.NetworkProject.projectId(header.targe t(), frame, false), url); 406 return workspace.uiSourceCode(Bindings.NetworkProject.projectId(header.targe t(), frame, false), url);
406 } 407 }
407 }; 408 };
408 409
409 Bindings.NetworkProject._networkProjectSymbol = Symbol('networkProject'); 410 Bindings.NetworkProject._networkProjectSymbol = Symbol('networkProject');
410 Bindings.NetworkProject._resourceSymbol = Symbol('resource'); 411 Bindings.NetworkProject._resourceSymbol = Symbol('resource');
411 Bindings.NetworkProject._scriptSymbol = Symbol('script'); 412 Bindings.NetworkProject._scriptSymbol = Symbol('script');
412 Bindings.NetworkProject._styleSheetSymbol = Symbol('styleSheet'); 413 Bindings.NetworkProject._styleSheetSymbol = Symbol('styleSheet');
413 Bindings.NetworkProject._targetSymbol = Symbol('target'); 414 Bindings.NetworkProject._targetSymbol = Symbol('target');
414 Bindings.NetworkProject._frameSymbol = Symbol('frame'); 415 Bindings.NetworkProject._frameSymbol = Symbol('frame');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698