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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 this._defaultHighlighter = new SDK.DefaultDOMNodeHighlighter(this._agent); | 1065 this._defaultHighlighter = new SDK.DefaultDOMNodeHighlighter(this._agent); |
1066 this._highlighter = this._defaultHighlighter; | 1066 this._highlighter = this._defaultHighlighter; |
1067 | 1067 |
1068 this._agent.enable(); | 1068 this._agent.enable(); |
1069 } | 1069 } |
1070 | 1070 |
1071 /** | 1071 /** |
1072 * @param {!SDK.RemoteObject} object | 1072 * @param {!SDK.RemoteObject} object |
1073 */ | 1073 */ |
1074 static highlightObjectAsDOMNode(object) { | 1074 static highlightObjectAsDOMNode(object) { |
1075 var domModel = SDK.DOMModel.fromTarget(object.target()); | 1075 var domModel = SDK.DOMModel.fromTarget(object.runtimeModel().target()); |
1076 if (domModel) | 1076 if (domModel) |
1077 domModel.highlightDOMNode(undefined, undefined, undefined, object.objectId
); | 1077 domModel.highlightDOMNode(undefined, undefined, undefined, object.objectId
); |
1078 } | 1078 } |
1079 | 1079 |
1080 /** | 1080 /** |
1081 * @return {!Array<!SDK.DOMModel>} | 1081 * @return {!Array<!SDK.DOMModel>} |
1082 */ | 1082 */ |
1083 static instances() { | 1083 static instances() { |
1084 var result = []; | 1084 var result = []; |
1085 for (var target of SDK.targetManager.targets()) { | 1085 for (var target of SDK.targetManager.targets()) { |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1844 callback(this.nodeForId(nodeId)); | 1844 callback(this.nodeForId(nodeId)); |
1845 } | 1845 } |
1846 } | 1846 } |
1847 | 1847 |
1848 /** | 1848 /** |
1849 * @param {!SDK.RemoteObject} object | 1849 * @param {!SDK.RemoteObject} object |
1850 * @param {function(?SDK.DOMNode)} callback | 1850 * @param {function(?SDK.DOMNode)} callback |
1851 */ | 1851 */ |
1852 pushObjectAsNodeToFrontend(object, callback) { | 1852 pushObjectAsNodeToFrontend(object, callback) { |
1853 if (object.isNode()) | 1853 if (object.isNode()) |
1854 this.pushNodeToFrontend(object.objectId, callback); | 1854 this.pushNodeToFrontend(/** @type {string} */ (object.objectId), callback)
; |
1855 else | 1855 else |
1856 callback(null); | 1856 callback(null); |
1857 } | 1857 } |
1858 | 1858 |
1859 /** | 1859 /** |
1860 * @override | 1860 * @override |
1861 * @return {!Promise} | 1861 * @return {!Promise} |
1862 */ | 1862 */ |
1863 suspendModel() { | 1863 suspendModel() { |
1864 return new Promise(promiseBody.bind(this)); | 1864 return new Promise(promiseBody.bind(this)); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 /** | 2148 /** |
2149 * @override | 2149 * @override |
2150 * @param {!Protocol.Page.FrameId} frameId | 2150 * @param {!Protocol.Page.FrameId} frameId |
2151 */ | 2151 */ |
2152 highlightFrame(frameId) { | 2152 highlightFrame(frameId) { |
2153 this._agent.highlightFrame( | 2153 this._agent.highlightFrame( |
2154 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), | 2154 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), |
2155 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); | 2155 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); |
2156 } | 2156 } |
2157 }; | 2157 }; |
OLD | NEW |