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

Side by Side Diff: Source/devtools/front_end/RemoteObject.js

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment addressed (and much more) Created 6 years, 8 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 /** 117 /**
118 * @param {*} value 118 * @param {*} value
119 * @return {!WebInspector.RemoteObject} 119 * @return {!WebInspector.RemoteObject}
120 */ 120 */
121 WebInspector.RemoteObject.fromLocalObject = function(value) 121 WebInspector.RemoteObject.fromLocalObject = function(value)
122 { 122 {
123 return new WebInspector.LocalJSONObject(value); 123 return new WebInspector.LocalJSONObject(value);
124 } 124 }
125 125
126 /** 126 /**
127 * @param {!WebInspector.DOMNode} node
128 * @param {string} objectGroup
129 * @param {function(?WebInspector.RemoteObject)} callback
130 */
131 WebInspector.RemoteObject.resolveNode = function(node, objectGroup, callback)
132 {
133 /**
134 * @param {?Protocol.Error} error
135 * @param {!RuntimeAgent.RemoteObject} object
136 */
137 function mycallback(error, object)
138 {
139 if (!callback)
140 return;
141
142 if (error || !object)
143 callback(null);
144 else
145 callback(node.target().runtimeModel.createRemoteObject(object));
146 }
147 DOMAgent.resolveNode(node.id, objectGroup, mycallback);
148 }
149
150 /**
151 * @param {!WebInspector.RemoteObject} remoteObject 127 * @param {!WebInspector.RemoteObject} remoteObject
152 * @return {string} 128 * @return {string}
153 */ 129 */
154 WebInspector.RemoteObject.type = function(remoteObject) 130 WebInspector.RemoteObject.type = function(remoteObject)
155 { 131 {
156 if (remoteObject === null) 132 if (remoteObject === null)
157 return "null"; 133 return "null";
158 134
159 var type = typeof remoteObject; 135 var type = typeof remoteObject;
160 if (type !== "object" && type !== "function") 136 if (type !== "object" && type !== "function")
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 result = functionDeclaration.apply(target, rawArgs); 925 result = functionDeclaration.apply(target, rawArgs);
950 } catch (e) { 926 } catch (e) {
951 result = null; 927 result = null;
952 } 928 }
953 929
954 callback(result); 930 callback(result);
955 }, 931 },
956 932
957 __proto__: WebInspector.RemoteObject.prototype 933 __proto__: WebInspector.RemoteObject.prototype
958 } 934 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/PropertiesSidebarPane.js ('k') | Source/devtools/front_end/StylesSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698