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

Side by Side Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 402873002: DevTools: Build function details' raw location in DebuggerModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment addressed Created 6 years, 5 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
« no previous file with comments | « Source/devtools/front_end/sdk/RemoteObject.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } 1068 }
1069 target.consoleModel.showErrorMessage(message); 1069 target.consoleModel.showErrorMessage(message);
1070 } 1070 }
1071 }, 1071 },
1072 1072
1073 /** 1073 /**
1074 * @param {!WebInspector.RemoteObject} remoteObject 1074 * @param {!WebInspector.RemoteObject} remoteObject
1075 */ 1075 */
1076 _showFunctionDefinition: function(remoteObject) 1076 _showFunctionDefinition: function(remoteObject)
1077 { 1077 {
1078 var target = remoteObject.target(); 1078 var debuggerModel = remoteObject.target().debuggerModel;
1079 1079
1080 /** 1080 /**
1081 * @param {?Protocol.Error} error 1081 * @param {?WebInspector.DebuggerModel.FunctionDetails} response
1082 * @param {!DebuggerAgent.FunctionDetails} response
1083 * @this {WebInspector.SourcesPanel} 1082 * @this {WebInspector.SourcesPanel}
1084 */ 1083 */
1085 function didGetFunctionDetails(error, response) 1084 function didGetFunctionDetails(response)
1086 { 1085 {
1087 if (error) { 1086 if (!response || !response.location)
1088 console.error(error);
1089 return; 1087 return;
1090 }
1091 1088
1092 var uiLocation = target.debuggerModel.rawLocationToUILocation(respon se.location); 1089 var uiLocation = debuggerModel.rawLocationToUILocation(response.loca tion);
1093 if (!uiLocation) 1090 if (!uiLocation)
1094 return; 1091 return;
1095 1092
1096 this.showUILocation(uiLocation, true); 1093 this.showUILocation(uiLocation, true);
1097 } 1094 }
1098 target.debuggerAgent().getFunctionDetails(remoteObject.objectId, didGetF unctionDetails.bind(this)); 1095 debuggerModel.functionDetails(remoteObject, didGetFunctionDetails.bind(t his));
1099 }, 1096 },
1100 1097
1101 showGoToSourceDialog: function() 1098 showGoToSourceDialog: function()
1102 { 1099 {
1103 this._sourcesView.showOpenResourceDialog(); 1100 this._sourcesView.showOpenResourceDialog();
1104 }, 1101 },
1105 1102
1106 _dockSideChanged: function() 1103 _dockSideChanged: function()
1107 { 1104 {
1108 var vertically = WebInspector.dockController.isVertical() && WebInspecto r.settings.splitVerticallyWhenDockedToRight.get(); 1105 var vertically = WebInspector.dockController.isVertical() && WebInspecto r.settings.splitVerticallyWhenDockedToRight.get();
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 */ 1472 */
1476 handleAction: function() 1473 handleAction: function()
1477 { 1474 {
1478 var panel = /** @type {?WebInspector.SourcesPanel} */ (WebInspector.insp ectorView.showPanel("sources")); 1475 var panel = /** @type {?WebInspector.SourcesPanel} */ (WebInspector.insp ectorView.showPanel("sources"));
1479 if (!panel) 1476 if (!panel)
1480 return false; 1477 return false;
1481 panel.togglePause(); 1478 panel.togglePause();
1482 return true; 1479 return true;
1483 } 1480 }
1484 } 1481 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/RemoteObject.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698