| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 143     _showBlackboxInfobarIfNeeded: function() | 143     _showBlackboxInfobarIfNeeded: function() | 
| 144     { | 144     { | 
| 145         if (!this.uiSourceCode().contentType().hasScripts()) | 145         if (!this.uiSourceCode().contentType().hasScripts()) | 
| 146             return; | 146             return; | 
| 147         var projectType = this.uiSourceCode().project().type(); | 147         var projectType = this.uiSourceCode().project().type(); | 
| 148         if (projectType === WebInspector.projectTypes.Snippets) | 148         if (projectType === WebInspector.projectTypes.Snippets) | 
| 149             return; | 149             return; | 
| 150         var networkURL = WebInspector.networkMapping.networkURL(this.uiSourceCod
      e()); | 150         var networkURL = WebInspector.networkMapping.networkURL(this.uiSourceCod
      e()); | 
| 151         var url = projectType === WebInspector.projectTypes.Formatter ? this.uiS
      ourceCode().url() : networkURL; | 151         var url = projectType === WebInspector.projectTypes.Formatter ? this.uiS
      ourceCode().url() : networkURL; | 
| 152         var isContentScript = projectType === WebInspector.projectTypes.ContentS
      cripts; | 152         var isContentScript = projectType === WebInspector.projectTypes.ContentS
      cripts; | 
| 153         if (!WebInspector.BlackboxSupport.isBlackboxed(url, isContentScript)) { | 153         if (!WebInspector.blackboxManager.isBlackboxedUISourceCode(this.uiSource
      Code())) { | 
| 154             this._hideBlackboxInfobar(); | 154             this._hideBlackboxInfobar(); | 
| 155             return; | 155             return; | 
| 156         } | 156         } | 
| 157 | 157 | 
| 158         if (this._blackboxInfobar) | 158         if (this._blackboxInfobar) | 
| 159             this._blackboxInfobar.dispose(); | 159             this._blackboxInfobar.dispose(); | 
| 160 | 160 | 
| 161         var infobar = new WebInspector.Infobar(WebInspector.Infobar.Type.Warning
      , WebInspector.UIString("This script is blackboxed in debugger")); | 161         var infobar = new WebInspector.Infobar(WebInspector.Infobar.Type.Warning
      , WebInspector.UIString("This script is blackboxed in debugger")); | 
| 162         this._blackboxInfobar = infobar; | 162         this._blackboxInfobar = infobar; | 
| 163 | 163 | 
| 164         infobar.createDetailsRowMessage(WebInspector.UIString("Debugger will ski
      p stepping through this script, and will not stop on exceptions")); | 164         infobar.createDetailsRowMessage(WebInspector.UIString("Debugger will ski
      p stepping through this script, and will not stop on exceptions")); | 
| 165         infobar.createDetailsRowMessage(); | 165         infobar.createDetailsRowMessage(); | 
| 166         infobar.createDetailsRowMessage(WebInspector.UIString("Possible ways to 
      cancel this behavior are:")); | 166         infobar.createDetailsRowMessage(WebInspector.UIString("Possible ways to 
      cancel this behavior are:")); | 
| 167 | 167 | 
| 168         infobar.createDetailsRowMessage(" - ").createTextChild(WebInspector.UISt
      ring("Go to \"%s\" tab in settings", WebInspector.manageBlackboxingSettingsTabLa
      bel())); | 168         infobar.createDetailsRowMessage(" - ").createTextChild(WebInspector.UISt
      ring("Go to \"%s\" tab in settings", WebInspector.manageBlackboxingSettingsTabLa
      bel())); | 
| 169         var unblackboxLink = infobar.createDetailsRowMessage(" - ").createChild(
      "span", "link"); | 169         var unblackboxLink = infobar.createDetailsRowMessage(" - ").createChild(
      "span", "link"); | 
| 170         unblackboxLink.textContent = WebInspector.UIString("Unblackbox this scri
      pt"); | 170         unblackboxLink.textContent = WebInspector.UIString("Unblackbox this scri
      pt"); | 
| 171         unblackboxLink.addEventListener("click", unblackbox, false); | 171         unblackboxLink.addEventListener("click", unblackbox, false); | 
| 172 | 172 | 
| 173         function unblackbox() | 173         function unblackbox() | 
| 174         { | 174         { | 
| 175             WebInspector.BlackboxSupport.unblackbox(url, isContentScript); | 175             WebInspector.blackboxManager.unblackbox(url, isContentScript); | 
| 176         } | 176         } | 
| 177 | 177 | 
| 178         this._updateInfobars(); | 178         this._updateInfobars(); | 
| 179     }, | 179     }, | 
| 180 | 180 | 
| 181     _hideBlackboxInfobar: function() | 181     _hideBlackboxInfobar: function() | 
| 182     { | 182     { | 
| 183         if (!this._blackboxInfobar) | 183         if (!this._blackboxInfobar) | 
| 184             return; | 184             return; | 
| 185         this._blackboxInfobar.dispose(); | 185         this._blackboxInfobar.dispose(); | 
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1112         this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
      .WorkingCopyChanged, this._workingCopyChanged, this); | 1112         this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
      .WorkingCopyChanged, this._workingCopyChanged, this); | 
| 1113         this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
      .WorkingCopyCommitted, this._workingCopyCommitted, this); | 1113         this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
      .WorkingCopyCommitted, this._workingCopyCommitted, this); | 
| 1114         this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
      .TitleChanged, this._showBlackboxInfobarIfNeeded, this); | 1114         this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events
      .TitleChanged, this._showBlackboxInfobarIfNeeded, this); | 
| 1115         WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
      r(this._showBlackboxInfobarIfNeeded, this); | 1115         WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
      r(this._showBlackboxInfobarIfNeeded, this); | 
| 1116         WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
      is._showBlackboxInfobarIfNeeded, this); | 1116         WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th
      is._showBlackboxInfobarIfNeeded, this); | 
| 1117         WebInspector.UISourceCodeFrame.prototype.dispose.call(this); | 1117         WebInspector.UISourceCodeFrame.prototype.dispose.call(this); | 
| 1118     }, | 1118     }, | 
| 1119 | 1119 | 
| 1120     __proto__: WebInspector.UISourceCodeFrame.prototype | 1120     __proto__: WebInspector.UISourceCodeFrame.prototype | 
| 1121 } | 1121 } | 
| OLD | NEW | 
|---|