| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 /** | 237 /** |
| 238 * @param {!UI.ContextMenu} contextMenu | 238 * @param {!UI.ContextMenu} contextMenu |
| 239 * @param {!Workspace.UISourceCode} uiSourceCode | 239 * @param {!Workspace.UISourceCode} uiSourceCode |
| 240 */ | 240 */ |
| 241 appendBlackboxURLContextMenuItems(contextMenu, uiSourceCode) { | 241 appendBlackboxURLContextMenuItems(contextMenu, uiSourceCode) { |
| 242 var binding = Persistence.persistence.binding(uiSourceCode); | 242 var binding = Persistence.persistence.binding(uiSourceCode); |
| 243 if (binding) | 243 if (binding) |
| 244 uiSourceCode = binding.network; | 244 uiSourceCode = binding.network; |
| 245 if (uiSourceCode.project().type() === Workspace.projectTypes.FileSystem) | 245 if (Persistence.FileSystemWorkspaceBinding.isFileSystemUISourceCode(uiSource
Code)) |
| 246 return; | 246 return; |
| 247 var canBlackbox = Bindings.blackboxManager.canBlackboxUISourceCode(uiSourceC
ode); | 247 var canBlackbox = Bindings.blackboxManager.canBlackboxUISourceCode(uiSourceC
ode); |
| 248 var isBlackboxed = Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourc
eCode); | 248 var isBlackboxed = Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourc
eCode); |
| 249 var isContentScript = uiSourceCode.project().type() === Workspace.projectTyp
es.ContentScripts; | 249 var isContentScript = Bindings.NetworkProject.isContentScriptUISourceCode(ui
SourceCode); |
| 250 | 250 |
| 251 var manager = Bindings.blackboxManager; | 251 var manager = Bindings.blackboxManager; |
| 252 if (canBlackbox) { | 252 if (canBlackbox) { |
| 253 if (isBlackboxed) { | 253 if (isBlackboxed) { |
| 254 contextMenu.appendItem( | 254 contextMenu.appendItem( |
| 255 Common.UIString.capitalize('Stop ^blackboxing'), | 255 Common.UIString.capitalize('Stop ^blackboxing'), |
| 256 manager.unblackboxUISourceCode.bind(manager, uiSourceCode)); | 256 manager.unblackboxUISourceCode.bind(manager, uiSourceCode)); |
| 257 } else { | 257 } else { |
| 258 contextMenu.appendItem( | 258 contextMenu.appendItem( |
| 259 Common.UIString.capitalize('Blackbox ^script'), manager.blackboxUISo
urceCode.bind(manager, uiSourceCode)); | 259 Common.UIString.capitalize('Blackbox ^script'), manager.blackboxUISo
urceCode.bind(manager, uiSourceCode)); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 */ | 435 */ |
| 436 _update(liveLocation) { | 436 _update(liveLocation) { |
| 437 var uiLocation = liveLocation.uiLocation(); | 437 var uiLocation = liveLocation.uiLocation(); |
| 438 if (!uiLocation) | 438 if (!uiLocation) |
| 439 return; | 439 return; |
| 440 var text = uiLocation.linkText(); | 440 var text = uiLocation.linkText(); |
| 441 this.setSubtitle(text.trimMiddle(30)); | 441 this.setSubtitle(text.trimMiddle(30)); |
| 442 this.subtitleElement.title = text; | 442 this.subtitleElement.title = text; |
| 443 } | 443 } |
| 444 }; | 444 }; |
| OLD | NEW |