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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/HandlerRegistry.js

Issue 2501883002: DevTools: kill Bindings.NetworkMapping (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 var anchorElement = targetNode.enclosingNodeOrSelfWithClass('webkit-html-res ource-link') || 167 var anchorElement = targetNode.enclosingNodeOrSelfWithClass('webkit-html-res ource-link') ||
168 targetNode.enclosingNodeOrSelfWithClass('webkit-html-external-link'); 168 targetNode.enclosingNodeOrSelfWithClass('webkit-html-external-link');
169 if (!anchorElement) 169 if (!anchorElement)
170 return; 170 return;
171 171
172 var uiLocation = Components.Linkifier.uiLocationByAnchor(anchorElement); 172 var uiLocation = Components.Linkifier.uiLocationByAnchor(anchorElement);
173 var resourceURL = uiLocation ? uiLocation.uiSourceCode.contentURL() : anchor Element.href; 173 var resourceURL = uiLocation ? uiLocation.uiSourceCode.contentURL() : anchor Element.href;
174 var uiSourceCode = uiLocation ? 174 var uiSourceCode = uiLocation ?
175 uiLocation.uiSourceCode : 175 uiLocation.uiSourceCode :
176 (resourceURL ? Bindings.networkMapping.uiSourceCodeForURLForAnyTarget(re sourceURL) : null); 176 (resourceURL ? Workspace.workspace.uiSourceCodeForURL(resourceURL) : nul l);
177 function open() { 177 function open() {
178 Common.Revealer.reveal(uiSourceCode); 178 Common.Revealer.reveal(uiSourceCode);
179 } 179 }
180 if (uiSourceCode) 180 if (uiSourceCode)
181 contextMenu.appendItem('Open', open); 181 contextMenu.appendItem('Open', open);
182 182
183 if (!resourceURL) 183 if (!resourceURL)
184 return; 184 return;
185 // Add resource-related actions. 185 // Add resource-related actions.
186 contextMenu.appendItem(UI.openLinkExternallyLabel(), this._openInNewTab.bind (this, resourceURL)); 186 contextMenu.appendItem(UI.openLinkExternallyLabel(), this._openInNewTab.bind (this, resourceURL));
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 var handlerSelector = new Components.HandlerSelector(Components.openAnchorLo cationRegistry); 291 var handlerSelector = new Components.HandlerSelector(Components.openAnchorLo cationRegistry);
292 return UI.SettingsUI.createCustomSetting(Common.UIString('Link handling:'), handlerSelector.element); 292 return UI.SettingsUI.createCustomSetting(Common.UIString('Link handling:'), handlerSelector.element);
293 } 293 }
294 }; 294 };
295 295
296 /** 296 /**
297 * @type {!Components.HandlerRegistry} 297 * @type {!Components.HandlerRegistry}
298 */ 298 */
299 Components.openAnchorLocationRegistry; 299 Components.openAnchorLocationRegistry;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698