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

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

Issue 2177383003: [Devtools] Added Copy All as cURL to network log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: requested changes Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (!contentProvider.contentURL()) 110 if (!contentProvider.contentURL())
111 return; 111 return;
112 112
113 contextMenu.appendItem(WebInspector.openLinkExternallyLabel(), this._ope nInNewTab.bind(this, contentProvider.contentURL())); 113 contextMenu.appendItem(WebInspector.openLinkExternallyLabel(), this._ope nInNewTab.bind(this, contentProvider.contentURL()));
114 // Skip 0th handler, as it's 'Use default panel' one. 114 // Skip 0th handler, as it's 'Use default panel' one.
115 for (var i = 1; i < this.handlerNames.length; ++i) { 115 for (var i = 1; i < this.handlerNames.length; ++i) {
116 var handler = this.handlerNames[i]; 116 var handler = this.handlerNames[i];
117 contextMenu.appendItem(WebInspector.UIString.capitalize("Open ^using %s", handler), 117 contextMenu.appendItem(WebInspector.UIString.capitalize("Open ^using %s", handler),
118 this.dispatchToHandler.bind(this, handler, { url: contentProvide r.contentURL() })); 118 this.dispatchToHandler.bind(this, handler, { url: contentProvide r.contentURL() }));
119 } 119 }
120
121 if (!contentProvider.contentURL() || contentProvider instanceof WebInspe ctor.NetworkRequest)
122 return;
123
120 contextMenu.appendItem(WebInspector.copyLinkAddressLabel(), InspectorFro ntendHost.copyText.bind(InspectorFrontendHost, contentProvider.contentURL())); 124 contextMenu.appendItem(WebInspector.copyLinkAddressLabel(), InspectorFro ntendHost.copyText.bind(InspectorFrontendHost, contentProvider.contentURL()));
121 125
122 if (!contentProvider.contentURL())
123 return;
124
125 if (!contentProvider.contentType().isDocumentOrScriptOrStyleSheet()) 126 if (!contentProvider.contentType().isDocumentOrScriptOrStyleSheet())
126 return; 127 return;
127 128
128 /** 129 /**
129 * @param {boolean} forceSaveAs 130 * @param {boolean} forceSaveAs
130 * @param {?string} content 131 * @param {?string} content
131 */ 132 */
132 function doSave(forceSaveAs, content) 133 function doSave(forceSaveAs, content)
133 { 134 {
134 var url = contentProvider.contentURL(); 135 var url = contentProvider.contentURL();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 317
317 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open AnchorLocationRegistry); 318 var handlerSelector = new WebInspector.HandlerSelector(WebInspector.open AnchorLocationRegistry);
318 return WebInspector.SettingsUI.createCustomSetting(WebInspector.UIString ("Link handling:"), handlerSelector.element); 319 return WebInspector.SettingsUI.createCustomSetting(WebInspector.UIString ("Link handling:"), handlerSelector.element);
319 } 320 }
320 } 321 }
321 322
322 /** 323 /**
323 * @type {!WebInspector.HandlerRegistry} 324 * @type {!WebInspector.HandlerRegistry}
324 */ 325 */
325 WebInspector.openAnchorLocationRegistry; 326 WebInspector.openAnchorLocationRegistry;
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698