| 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 30 matching lines...) Expand all Loading... |
| 41 this._storage = new WebInspector.BreakpointManager.Storage(this, breakpointS
torage); | 41 this._storage = new WebInspector.BreakpointManager.Storage(this, breakpointS
torage); |
| 42 this._workspace = workspace; | 42 this._workspace = workspace; |
| 43 this._targetManager = targetManager; | 43 this._targetManager = targetManager; |
| 44 | 44 |
| 45 this._breakpointForDebuggerId = {}; | 45 this._breakpointForDebuggerId = {}; |
| 46 this._breakpointsForUISourceCode = new Map(); | 46 this._breakpointsForUISourceCode = new Map(); |
| 47 this._breakpointsForPrimaryUISourceCode = new Map(); | 47 this._breakpointsForPrimaryUISourceCode = new Map(); |
| 48 /** @type {!StringMultimap.<!WebInspector.BreakpointManager.Breakpoint>} */ | 48 /** @type {!StringMultimap.<!WebInspector.BreakpointManager.Breakpoint>} */ |
| 49 this._provisionalBreakpoints = new StringMultimap(); | 49 this._provisionalBreakpoints = new StringMultimap(); |
| 50 | 50 |
| 51 this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectWillRe
set, this._projectWillReset, this); | 51 this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemove
d, this._projectRemoved, this); |
| 52 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeA
dded, this._uiSourceCodeAdded, this); | 52 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeA
dded, this._uiSourceCodeAdded, this); |
| 53 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeR
emoved, this._uiSourceCodeRemoved, this); | 53 this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeR
emoved, this._uiSourceCodeRemoved, this); |
| 54 this._targetManager.observeTargets(this); | 54 this._targetManager.observeTargets(this); |
| 55 } | 55 } |
| 56 | 56 |
| 57 WebInspector.BreakpointManager.Events = { | 57 WebInspector.BreakpointManager.Events = { |
| 58 BreakpointAdded: "breakpoint-added", | 58 BreakpointAdded: "breakpoint-added", |
| 59 BreakpointRemoved: "breakpoint-removed" | 59 BreakpointRemoved: "breakpoint-removed" |
| 60 } | 60 } |
| 61 | 61 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 breakpoints[i].setEnabled(toggleState); | 346 breakpoints[i].setEnabled(toggleState); |
| 347 }, | 347 }, |
| 348 | 348 |
| 349 removeAllBreakpoints: function() | 349 removeAllBreakpoints: function() |
| 350 { | 350 { |
| 351 var breakpoints = this.allBreakpoints(); | 351 var breakpoints = this.allBreakpoints(); |
| 352 for (var i = 0; i < breakpoints.length; ++i) | 352 for (var i = 0; i < breakpoints.length; ++i) |
| 353 breakpoints[i].remove(); | 353 breakpoints[i].remove(); |
| 354 }, | 354 }, |
| 355 | 355 |
| 356 _projectWillReset: function(event) | 356 _projectRemoved: function(event) |
| 357 { | 357 { |
| 358 var project = /** @type {!WebInspector.Project} */ (event.data); | 358 var project = /** @type {!WebInspector.Project} */ (event.data); |
| 359 var uiSourceCodes = project.uiSourceCodes(); | 359 var uiSourceCodes = project.uiSourceCodes(); |
| 360 for (var i = 0; i < uiSourceCodes.length; ++i) | 360 for (var i = 0; i < uiSourceCodes.length; ++i) |
| 361 this._removeUISourceCode(uiSourceCodes[i]); | 361 this._removeUISourceCode(uiSourceCodes[i]); |
| 362 }, | 362 }, |
| 363 | 363 |
| 364 _breakpointResolved: function(event) | 364 _breakpointResolved: function(event) |
| 365 { | 365 { |
| 366 var breakpointId = /** @type {!DebuggerAgent.BreakpointId} */ (event.dat
a.breakpointId); | 366 var breakpointId = /** @type {!DebuggerAgent.BreakpointId} */ (event.dat
a.breakpointId); |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 { | 796 { |
| 797 this.sourceFileId = breakpoint._sourceFileId; | 797 this.sourceFileId = breakpoint._sourceFileId; |
| 798 this.lineNumber = breakpoint.lineNumber(); | 798 this.lineNumber = breakpoint.lineNumber(); |
| 799 this.columnNumber = breakpoint.columnNumber(); | 799 this.columnNumber = breakpoint.columnNumber(); |
| 800 this.condition = breakpoint.condition(); | 800 this.condition = breakpoint.condition(); |
| 801 this.enabled = breakpoint.enabled(); | 801 this.enabled = breakpoint.enabled(); |
| 802 } | 802 } |
| 803 | 803 |
| 804 /** @type {!WebInspector.BreakpointManager} */ | 804 /** @type {!WebInspector.BreakpointManager} */ |
| 805 WebInspector.breakpointManager; | 805 WebInspector.breakpointManager; |
| OLD | NEW |