| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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; |
| OLD | NEW |