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

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

Issue 2149833002: DevTools: Add sendOverProtocol() method for protocol debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 /** 312 /**
313 * @param {!Object} messageObject 313 * @param {!Object} messageObject
314 */ 314 */
315 sendMessage: function(messageObject) 315 sendMessage: function(messageObject)
316 { 316 {
317 throw "Not implemented"; 317 throw "Not implemented";
318 }, 318 },
319 319
320 /** 320 /**
321 * @param {string} method
322 * @param {?Object} params
323 * @param {?function(*)} callback
324 * @return {function(*)}
325 */
326 sendUserMessage = function(method, params, cb){
dgozman 2016/07/13 22:50:03 sendRawMessageForTesting
327 var domain = method.split(".")[0];
328 this._wrapCallbackAndSendMessageObject(domain, method, params, cb);
329 },
330
331 /**
321 * @param {!Object|string} message 332 * @param {!Object|string} message
322 */ 333 */
323 dispatch: function(message) 334 dispatch: function(message)
324 { 335 {
325 if (InspectorBackendClass.Options.dumpInspectorProtocolMessages) 336 if (InspectorBackendClass.Options.dumpInspectorProtocolMessages)
326 this._dumpProtocolMessage("backend: " + ((typeof message === "string ") ? message : JSON.stringify(message))); 337 this._dumpProtocolMessage("backend: " + ((typeof message === "string ") ? message : JSON.stringify(message)));
327 338
328 var messageObject = /** @type {!Object} */ ((typeof message === "string" ) ? JSON.parse(message) : message); 339 var messageObject = /** @type {!Object} */ ((typeof message === "string" ) ? JSON.parse(message) : message);
329 340
330 if ("id" in messageObject) { // just a response for some request 341 if ("id" in messageObject) { // just a response for some request
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 733 }
723 } 734 }
724 735
725 InspectorBackendClass.Options = { 736 InspectorBackendClass.Options = {
726 dumpInspectorTimeStats: false, 737 dumpInspectorTimeStats: false,
727 dumpInspectorProtocolMessages: false, 738 dumpInspectorProtocolMessages: false,
728 suppressRequestErrors: false 739 suppressRequestErrors: false
729 } 740 }
730 741
731 InspectorBackend = new InspectorBackendClass(); 742 InspectorBackend = new InspectorBackendClass();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698