Chromium Code Reviews| 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) | |
|
lushnikov
2016/12/02 01:31:32
let's bring this back for now
dgozman
2016/12/02 02:33:00
Done.
| |
| 246 return; | |
| 247 var canBlackbox = Bindings.blackboxManager.canBlackboxUISourceCode(uiSourceC ode); | 245 var canBlackbox = Bindings.blackboxManager.canBlackboxUISourceCode(uiSourceC ode); |
| 248 var isBlackboxed = Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourc eCode); | 246 var isBlackboxed = Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourc eCode); |
| 249 var isContentScript = uiSourceCode.project().type() === Workspace.projectTyp es.ContentScripts; | 247 var isContentScript = uiSourceCode.project().type() === Workspace.projectTyp es.ContentScripts; |
| 250 | 248 |
| 251 var manager = Bindings.blackboxManager; | 249 var manager = Bindings.blackboxManager; |
| 252 if (canBlackbox) { | 250 if (canBlackbox) { |
| 253 if (isBlackboxed) { | 251 if (isBlackboxed) { |
| 254 contextMenu.appendItem( | 252 contextMenu.appendItem( |
| 255 Common.UIString.capitalize('Stop ^blackboxing'), | 253 Common.UIString.capitalize('Stop ^blackboxing'), |
| 256 manager.unblackboxUISourceCode.bind(manager, uiSourceCode)); | 254 manager.unblackboxUISourceCode.bind(manager, uiSourceCode)); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 */ | 433 */ |
| 436 _update(liveLocation) { | 434 _update(liveLocation) { |
| 437 var uiLocation = liveLocation.uiLocation(); | 435 var uiLocation = liveLocation.uiLocation(); |
| 438 if (!uiLocation) | 436 if (!uiLocation) |
| 439 return; | 437 return; |
| 440 var text = uiLocation.linkText(); | 438 var text = uiLocation.linkText(); |
| 441 this.setSubtitle(text.trimMiddle(30)); | 439 this.setSubtitle(text.trimMiddle(30)); |
| 442 this.subtitleElement.title = text; | 440 this.subtitleElement.title = text; |
| 443 } | 441 } |
| 444 }; | 442 }; |
| OLD | NEW |