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

Side by Side Diff: Source/devtools/front_end/PresentationConsoleMessageHelper.js

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 years, 8 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 /** 146 /**
147 * @constructor 147 * @constructor
148 * @param {!WebInspector.ConsoleMessage} message 148 * @param {!WebInspector.ConsoleMessage} message
149 * @param {!WebInspector.DebuggerModel.Location} rawLocation 149 * @param {!WebInspector.DebuggerModel.Location} rawLocation
150 */ 150 */
151 WebInspector.PresentationConsoleMessage = function(message, rawLocation) 151 WebInspector.PresentationConsoleMessage = function(message, rawLocation)
152 { 152 {
153 this.originalMessage = message; 153 this.originalMessage = message;
154 this._liveLocation = WebInspector.debuggerModel.createLiveLocation(rawLocati on, this._updateLocation.bind(this)); 154 this._liveLocation = rawLocation.createLiveLocation(this._updateLocation.bin d(this));
155 } 155 }
156 156
157 WebInspector.PresentationConsoleMessage.prototype = { 157 WebInspector.PresentationConsoleMessage.prototype = {
158 /** 158 /**
159 * @param {!WebInspector.UILocation} uiLocation 159 * @param {!WebInspector.UILocation} uiLocation
160 */ 160 */
161 _updateLocation: function(uiLocation) 161 _updateLocation: function(uiLocation)
162 { 162 {
163 if (this._uiLocation) 163 if (this._uiLocation)
164 this._uiLocation.uiSourceCode.consoleMessageRemoved(this); 164 this._uiLocation.uiSourceCode.consoleMessageRemoved(this);
165 this._uiLocation = uiLocation; 165 this._uiLocation = uiLocation;
166 this._uiLocation.uiSourceCode.consoleMessageAdded(this); 166 this._uiLocation.uiSourceCode.consoleMessageAdded(this);
167 }, 167 },
168 168
169 get lineNumber() 169 get lineNumber()
170 { 170 {
171 return this._uiLocation.lineNumber; 171 return this._uiLocation.lineNumber;
172 }, 172 },
173 173
174 dispose: function() 174 dispose: function()
175 { 175 {
176 this._liveLocation.dispose(); 176 this._liveLocation.dispose();
177 } 177 }
178 } 178 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ObjectPropertiesSection.js ('k') | Source/devtools/front_end/ProfileDataGridTree.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698