| OLD | NEW |
| 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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 * @param {!Object} target | 945 * @param {!Object} target |
| 946 */ | 946 */ |
| 947 _appendRemoteObjectItems: function(contextMenu, target) | 947 _appendRemoteObjectItems: function(contextMenu, target) |
| 948 { | 948 { |
| 949 if (!(target instanceof WebInspector.RemoteObject)) | 949 if (!(target instanceof WebInspector.RemoteObject)) |
| 950 return; | 950 return; |
| 951 var remoteObject = /** @type {!WebInspector.RemoteObject} */ (target); | 951 var remoteObject = /** @type {!WebInspector.RemoteObject} */ (target); |
| 952 contextMenu.appendItem(WebInspector.UIString.capitalize("Store as ^globa
l ^variable"), this._saveToTempVariable.bind(this, remoteObject)); | 952 contextMenu.appendItem(WebInspector.UIString.capitalize("Store as ^globa
l ^variable"), this._saveToTempVariable.bind(this, remoteObject)); |
| 953 if (remoteObject.type === "function") | 953 if (remoteObject.type === "function") |
| 954 contextMenu.appendItem(WebInspector.UIString.capitalize("Show ^funct
ion ^definition"), this._showFunctionDefinition.bind(this, remoteObject)); | 954 contextMenu.appendItem(WebInspector.UIString.capitalize("Show ^funct
ion ^definition"), this._showFunctionDefinition.bind(this, remoteObject)); |
| 955 if (remoteObject.subtype === "generator") | |
| 956 contextMenu.appendItem(WebInspector.UIString.capitalize("Show ^gener
ator ^location"), this._showGeneratorLocation.bind(this, remoteObject)); | |
| 957 }, | 955 }, |
| 958 | 956 |
| 959 /** | 957 /** |
| 960 * @param {!WebInspector.ContextMenu} contextMenu | 958 * @param {!WebInspector.ContextMenu} contextMenu |
| 961 * @param {!Object} target | 959 * @param {!Object} target |
| 962 */ | 960 */ |
| 963 _appendNetworkRequestItems: function(contextMenu, target) | 961 _appendNetworkRequestItems: function(contextMenu, target) |
| 964 { | 962 { |
| 965 if (!(target instanceof WebInspector.NetworkRequest)) | 963 if (!(target instanceof WebInspector.NetworkRequest)) |
| 966 return; | 964 return; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 } | 1033 } |
| 1036 WebInspector.console.error(message); | 1034 WebInspector.console.error(message); |
| 1037 } | 1035 } |
| 1038 }, | 1036 }, |
| 1039 | 1037 |
| 1040 /** | 1038 /** |
| 1041 * @param {!WebInspector.RemoteObject} remoteObject | 1039 * @param {!WebInspector.RemoteObject} remoteObject |
| 1042 */ | 1040 */ |
| 1043 _showFunctionDefinition: function(remoteObject) | 1041 _showFunctionDefinition: function(remoteObject) |
| 1044 { | 1042 { |
| 1045 remoteObject.debuggerModel().functionDetails(remoteObject, this._didGetF
unctionOrGeneratorObjectDetails.bind(this)); | 1043 remoteObject.debuggerModel().functionDetails(remoteObject, this._didGetF
unctionDetails.bind(this)); |
| 1046 }, | |
| 1047 | |
| 1048 /** | |
| 1049 * @param {!WebInspector.RemoteObject} remoteObject | |
| 1050 */ | |
| 1051 _showGeneratorLocation: function(remoteObject) | |
| 1052 { | |
| 1053 remoteObject.debuggerModel().generatorObjectDetails(remoteObject, this._
didGetFunctionOrGeneratorObjectDetails.bind(this)); | |
| 1054 }, | 1044 }, |
| 1055 | 1045 |
| 1056 /** | 1046 /** |
| 1057 * @param {?{location: ?WebInspector.DebuggerModel.Location}} response | 1047 * @param {?{location: ?WebInspector.DebuggerModel.Location}} response |
| 1058 */ | 1048 */ |
| 1059 _didGetFunctionOrGeneratorObjectDetails: function(response) | 1049 _didGetFunctionDetails: function(response) |
| 1060 { | 1050 { |
| 1061 if (!response || !response.location) | 1051 if (!response || !response.location) |
| 1062 return; | 1052 return; |
| 1063 | 1053 |
| 1064 var location = response.location; | 1054 var location = response.location; |
| 1065 if (!location) | 1055 if (!location) |
| 1066 return; | 1056 return; |
| 1067 | 1057 |
| 1068 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILo
cation(location); | 1058 var uiLocation = WebInspector.debuggerWorkspaceBinding.rawLocationToUILo
cation(location); |
| 1069 if (uiLocation) | 1059 if (uiLocation) |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 __proto__: WebInspector.VBox.prototype | 1472 __proto__: WebInspector.VBox.prototype |
| 1483 } | 1473 } |
| 1484 | 1474 |
| 1485 /** | 1475 /** |
| 1486 * @return {boolean} | 1476 * @return {boolean} |
| 1487 */ | 1477 */ |
| 1488 WebInspector.SourcesPanel.WrapperView.isShowing = function() | 1478 WebInspector.SourcesPanel.WrapperView.isShowing = function() |
| 1489 { | 1479 { |
| 1490 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou
rcesPanel.WrapperView._instance.isShowing(); | 1480 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou
rcesPanel.WrapperView._instance.isShowing(); |
| 1491 } | 1481 } |
| OLD | NEW |