Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Side by Side Diff: Source/devtools/front_end/sdk/BreakpointManager.js

Issue 464963002: DevTools: Make UISourceCode Target-agnostic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 targetAdded: function(target) { 88 targetAdded: function(target) {
89 if (!this._breakpointsActive) 89 if (!this._breakpointsActive)
90 target.debuggerAgent().setBreakpointsActive(this._breakpointsActive) ; 90 target.debuggerAgent().setBreakpointsActive(this._breakpointsActive) ;
91 }, 91 },
92 92
93 /** 93 /**
94 * @param {!WebInspector.Target} target 94 * @param {!WebInspector.Target} target
95 */ 95 */
96 targetRemoved: function(target) { }, 96 targetRemoved: function(target) { },
97 97
98
99 /** 98 /**
100 * @param {string} sourceFileId 99 * @param {string} sourceFileId
101 * @return {!StringMap.<!WebInspector.BreakpointManager.Breakpoint>} 100 * @return {!StringMap.<!WebInspector.BreakpointManager.Breakpoint>}
102 */ 101 */
103 _provisionalBreakpointsForSourceFileId: function(sourceFileId) 102 _provisionalBreakpointsForSourceFileId: function(sourceFileId)
104 { 103 {
105 var result = new StringMap(); 104 var result = new StringMap();
106 var breakpoints = this._provisionalBreakpoints.get(sourceFileId).values( ); 105 var breakpoints = this._provisionalBreakpoints.get(sourceFileId).values( );
107 for (var i = 0; i < breakpoints.length; ++i) 106 for (var i = 0; i < breakpoints.length; ++i)
108 result.put(breakpoints[i]._breakpointStorageId(), breakpoints[i]); 107 result.put(breakpoints[i]._breakpointStorageId(), breakpoints[i]);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 }, 767 },
769 768
770 /** 769 /**
771 * @return {boolean} 770 * @return {boolean}
772 */ 771 */
773 _scriptDiverged: function() 772 _scriptDiverged: function()
774 { 773 {
775 var uiSourceCode = this._breakpoint.uiSourceCode(); 774 var uiSourceCode = this._breakpoint.uiSourceCode();
776 if (!uiSourceCode) 775 if (!uiSourceCode)
777 return false; 776 return false;
778 var scriptFile = uiSourceCode.scriptFileForTarget(this.target()); 777 var scriptFile = this._debuggerWorkspaceBinding.scriptFile(uiSourceCode, this.target());
779 return !!scriptFile && scriptFile.hasDivergedFromVM(); 778 return !!scriptFile && scriptFile.hasDivergedFromVM();
780 779
781 }, 780 },
782 781
783 /** 782 /**
784 * @param {function()} callback 783 * @param {function()} callback
785 */ 784 */
786 _updateInDebugger: function(callback) 785 _updateInDebugger: function(callback)
787 { 786 {
788 if (this.target().isDetached()) { 787 if (this.target().isDetached()) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 { 1059 {
1061 this.sourceFileId = breakpoint._sourceFileId; 1060 this.sourceFileId = breakpoint._sourceFileId;
1062 this.lineNumber = breakpoint.lineNumber(); 1061 this.lineNumber = breakpoint.lineNumber();
1063 this.columnNumber = breakpoint.columnNumber(); 1062 this.columnNumber = breakpoint.columnNumber();
1064 this.condition = breakpoint.condition(); 1063 this.condition = breakpoint.condition();
1065 this.enabled = breakpoint.enabled(); 1064 this.enabled = breakpoint.enabled();
1066 } 1065 }
1067 1066
1068 /** @type {!WebInspector.BreakpointManager} */ 1067 /** @type {!WebInspector.BreakpointManager} */
1069 WebInspector.breakpointManager; 1068 WebInspector.breakpointManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698