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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1847 /** | 1847 /** |
1848 * @constructor | 1848 * @constructor |
1849 * @extends {WebInspector.SDKObject} | 1849 * @extends {WebInspector.SDKObject} |
1850 * @param {!WebInspector.Target} target | 1850 * @param {!WebInspector.Target} target |
1851 * @param {!DOMAgent.EventListener} payload | 1851 * @param {!DOMAgent.EventListener} payload |
1852 */ | 1852 */ |
1853 WebInspector.DOMModel.EventListener = function(target, payload) | 1853 WebInspector.DOMModel.EventListener = function(target, payload) |
1854 { | 1854 { |
1855 WebInspector.SDKObject.call(this, target); | 1855 WebInspector.SDKObject.call(this, target); |
1856 this._payload = payload; | 1856 this._payload = payload; |
| 1857 var sourceName = this._payload.sourceName; |
| 1858 if (!sourceName) { |
| 1859 var script = target.debuggerModel.scriptForId(payload.location.scriptId)
; |
| 1860 sourceName = script ? script.contentURL() : ""; |
| 1861 } |
| 1862 this._sourceName = sourceName; |
1857 } | 1863 } |
1858 | 1864 |
1859 WebInspector.DOMModel.EventListener.prototype = { | 1865 WebInspector.DOMModel.EventListener.prototype = { |
1860 /** | 1866 /** |
1861 * @return {!DOMAgent.EventListener} | 1867 * @return {!DOMAgent.EventListener} |
1862 */ | 1868 */ |
1863 payload: function() | 1869 payload: function() |
1864 { | 1870 { |
1865 return this._payload; | 1871 return this._payload; |
1866 }, | 1872 }, |
(...skipping 15 matching lines...) Expand all Loading... |
1882 }, | 1888 }, |
1883 | 1889 |
1884 /** | 1890 /** |
1885 * @return {?WebInspector.RemoteObject} | 1891 * @return {?WebInspector.RemoteObject} |
1886 */ | 1892 */ |
1887 handler: function() | 1893 handler: function() |
1888 { | 1894 { |
1889 return this._payload.handler ? this.target().runtimeModel.createRemoteOb
ject(this._payload.handler) : null; | 1895 return this._payload.handler ? this.target().runtimeModel.createRemoteOb
ject(this._payload.handler) : null; |
1890 }, | 1896 }, |
1891 | 1897 |
| 1898 /** |
| 1899 * @return {string} |
| 1900 */ |
| 1901 sourceName: function() |
| 1902 { |
| 1903 return this._sourceName; |
| 1904 }, |
| 1905 |
1892 __proto__: WebInspector.SDKObject.prototype | 1906 __proto__: WebInspector.SDKObject.prototype |
1893 } | 1907 } |
1894 | 1908 |
1895 /** | 1909 /** |
1896 * @interface | 1910 * @interface |
1897 */ | 1911 */ |
1898 WebInspector.DOMNodeHighlighter = function() { | 1912 WebInspector.DOMNodeHighlighter = function() { |
1899 } | 1913 } |
1900 | 1914 |
1901 WebInspector.DOMNodeHighlighter.prototype = { | 1915 WebInspector.DOMNodeHighlighter.prototype = { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 * @param {boolean} inspectUAShadowDOM | 1958 * @param {boolean} inspectUAShadowDOM |
1945 * @param {!DOMAgent.HighlightConfig} config | 1959 * @param {!DOMAgent.HighlightConfig} config |
1946 * @param {function(?Protocol.Error)=} callback | 1960 * @param {function(?Protocol.Error)=} callback |
1947 */ | 1961 */ |
1948 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) | 1962 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) |
1949 { | 1963 { |
1950 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); | 1964 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); |
1951 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); | 1965 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); |
1952 } | 1966 } |
1953 } | 1967 } |
OLD | NEW |