OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
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 are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 /** | 2078 /** |
2079 * @constructor | 2079 * @constructor |
2080 * @extends {WebInspector.SDKObject} | 2080 * @extends {WebInspector.SDKObject} |
2081 * @param {!WebInspector.Target} target | 2081 * @param {!WebInspector.Target} target |
2082 * @param {!DOMAgent.EventListener} payload | 2082 * @param {!DOMAgent.EventListener} payload |
2083 */ | 2083 */ |
2084 WebInspector.DOMModel.EventListener = function(target, payload) | 2084 WebInspector.DOMModel.EventListener = function(target, payload) |
2085 { | 2085 { |
2086 WebInspector.SDKObject.call(this, target); | 2086 WebInspector.SDKObject.call(this, target); |
2087 this._payload = payload; | 2087 this._payload = payload; |
2088 var sourceName = this._payload.sourceName; | 2088 var script = target.debuggerModel.scriptForId(payload.location.scriptId); |
2089 if (!sourceName) { | 2089 var sourceName = script ? script.contentURL() : ""; |
2090 var script = target.debuggerModel.scriptForId(payload.location.scriptId)
; | |
2091 sourceName = script ? script.contentURL() : ""; | |
2092 } | |
2093 this._sourceName = sourceName; | 2090 this._sourceName = sourceName; |
2094 } | 2091 } |
2095 | 2092 |
2096 WebInspector.DOMModel.EventListener.prototype = { | 2093 WebInspector.DOMModel.EventListener.prototype = { |
2097 /** | 2094 /** |
2098 * @return {!DOMAgent.EventListener} | 2095 * @return {!DOMAgent.EventListener} |
2099 */ | 2096 */ |
2100 payload: function() | 2097 payload: function() |
2101 { | 2098 { |
2102 return this._payload; | 2099 return this._payload; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2191 * @param {boolean} inspectUAShadowDOM | 2188 * @param {boolean} inspectUAShadowDOM |
2192 * @param {!DOMAgent.HighlightConfig} config | 2189 * @param {!DOMAgent.HighlightConfig} config |
2193 * @param {function(?Protocol.Error)=} callback | 2190 * @param {function(?Protocol.Error)=} callback |
2194 */ | 2191 */ |
2195 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) | 2192 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) |
2196 { | 2193 { |
2197 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); | 2194 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); |
2198 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); | 2195 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); |
2199 } | 2196 } |
2200 } | 2197 } |
OLD | NEW |