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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js

Issue 1702673002: DevTools: migrate remote debugging protocol generators to jinja2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 * @param {?function(*)} callback 267 * @param {?function(*)} callback
268 */ 268 */
269 _wrapCallbackAndSendMessageObject: function(domain, method, params, callback ) 269 _wrapCallbackAndSendMessageObject: function(domain, method, params, callback )
270 { 270 {
271 if (!this._isConnected && callback) { 271 if (!this._isConnected && callback) {
272 this._dispatchConnectionErrorResponse(domain, method, callback); 272 this._dispatchConnectionErrorResponse(domain, method, callback);
273 return; 273 return;
274 } 274 }
275 275
276 var messageObject = {}; 276 var messageObject = {};
277
278 var messageId = this.nextMessageId(); 277 var messageId = this.nextMessageId();
279 messageObject.id = messageId; 278 messageObject.id = messageId;
280
281 messageObject.method = method; 279 messageObject.method = method;
282 if (params) 280 if (params)
283 messageObject.params = params; 281 messageObject.params = params;
284 282
285 var wrappedCallback = this._wrap(callback, domain, method); 283 var wrappedCallback = this._wrap(callback, domain, method);
286 284
287 if (InspectorBackendClass.Options.dumpInspectorProtocolMessages) 285 if (InspectorBackendClass.Options.dumpInspectorProtocolMessages)
288 this._dumpProtocolMessage("frontend: " + JSON.stringify(messageObjec t)); 286 this._dumpProtocolMessage("frontend: " + JSON.stringify(messageObjec t));
289 287
290 this.sendMessage(messageObject); 288 this.sendMessage(messageObject);
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 722 }
725 } 723 }
726 724
727 InspectorBackendClass.Options = { 725 InspectorBackendClass.Options = {
728 dumpInspectorTimeStats: false, 726 dumpInspectorTimeStats: false,
729 dumpInspectorProtocolMessages: false, 727 dumpInspectorProtocolMessages: false,
730 suppressRequestErrors: false 728 suppressRequestErrors: false
731 } 729 }
732 730
733 InspectorBackend = new InspectorBackendClass(); 731 InspectorBackend = new InspectorBackendClass();
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/PageRuntimeAgent.cpp ('k') | third_party/WebKit/Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698