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

Side by Side Diff: Source/devtools/front_end/sdk/DOMModel.js

Issue 400633003: DevTools: introduce multitarget model listeners (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
OLDNEW
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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 this.xmlVersion = payload.xmlVersion; 907 this.xmlVersion = payload.xmlVersion;
908 this._listeners = {}; 908 this._listeners = {};
909 } 909 }
910 910
911 WebInspector.DOMDocument.prototype = { 911 WebInspector.DOMDocument.prototype = {
912 __proto__: WebInspector.DOMNode.prototype 912 __proto__: WebInspector.DOMNode.prototype
913 } 913 }
914 914
915 /** 915 /**
916 * @constructor 916 * @constructor
917 * @extends {WebInspector.SDKObject} 917 * @extends {WebInspector.SDKModel}
918 * @param {!WebInspector.Target} target 918 * @param {!WebInspector.Target} target
919 */ 919 */
920 WebInspector.DOMModel = function(target) { 920 WebInspector.DOMModel = function(target) {
921 WebInspector.SDKObject.call(this, target); 921 WebInspector.SDKModel.call(this, WebInspector.DOMModel, target);
922 922
923 this._agent = target.domAgent(); 923 this._agent = target.domAgent();
924 924
925 /** @type {!Object.<number, !WebInspector.DOMNode>} */ 925 /** @type {!Object.<number, !WebInspector.DOMNode>} */
926 this._idToDOMNode = {}; 926 this._idToDOMNode = {};
927 /** @type {?WebInspector.DOMDocument} */ 927 /** @type {?WebInspector.DOMDocument} */
928 this._document = null; 928 this._document = null;
929 /** @type {!Object.<number, boolean>} */ 929 /** @type {!Object.<number, boolean>} */
930 this._attributeLoadNodeIds = {}; 930 this._attributeLoadNodeIds = {};
931 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this)); 931 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this));
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 function mycallback(error, nodeId) 1683 function mycallback(error, nodeId)
1684 { 1684 {
1685 if (error) { 1685 if (error) {
1686 callback(null); 1686 callback(null);
1687 return; 1687 return;
1688 } 1688 }
1689 callback(this.nodeForId(nodeId)); 1689 callback(this.nodeForId(nodeId));
1690 } 1690 }
1691 }, 1691 },
1692 1692
1693 __proto__: WebInspector.SDKObject.prototype 1693 __proto__: WebInspector.SDKModel.prototype
1694 } 1694 }
1695 1695
1696 /** 1696 /**
1697 * @constructor 1697 * @constructor
1698 * @implements {DOMAgent.Dispatcher} 1698 * @implements {DOMAgent.Dispatcher}
1699 * @param {!WebInspector.DOMModel} domModel 1699 * @param {!WebInspector.DOMModel} domModel
1700 */ 1700 */
1701 WebInspector.DOMDispatcher = function(domModel) 1701 WebInspector.DOMDispatcher = function(domModel)
1702 { 1702 {
1703 this._domModel = domModel; 1703 this._domModel = domModel;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 * @param {boolean} inspectUAShadowDOM 1927 * @param {boolean} inspectUAShadowDOM
1928 * @param {!DOMAgent.HighlightConfig} config 1928 * @param {!DOMAgent.HighlightConfig} config
1929 * @param {function(?Protocol.Error)=} callback 1929 * @param {function(?Protocol.Error)=} callback
1930 */ 1930 */
1931 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac k) 1931 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac k)
1932 { 1932 {
1933 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); 1933 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled);
1934 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c allback); 1934 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c allback);
1935 } 1935 }
1936 } 1936 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/ConsoleModel.js ('k') | Source/devtools/front_end/sdk/DOMStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698