OnDevToolsMessage - for what function?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

OnDevToolsMessage - for what function?

Postby Staxcelrom » Thu Apr 07, 2022 6:43 am

Hello,

The Description for the OnDevToolsMessage function says: https://github.com/chromiumembedded/cef/blob/master/include/cef_devtools_message_observer.h

// Method that will be called on receipt of a DevTools protocol message.
// |browser| is the originating browser instance. |message| is a UTF8-encoded
// JSON dictionary representing either a method result or an event. |message|
// is only valid for the scope of this callback and should be copied if
// necessary. Return true if the message was handled or false if the message
// should be further processed and passed to the OnDevToolsMethodResult or
// OnDevToolsEvent methods as appropriate.
//
// Method result dictionaries include an "id" (int) value that identifies the
// orginating method call sent from CefBrowserHost::SendDevToolsMessage, and
// optionally either a "result" (dictionary) or "error" (dictionary) value.
// The "error" dictionary will contain "code" (int) and "message" (string)
// values. Event dictionaries include a "method" (string) value and optionally
// a "params" (dictionary) value. See the DevTools protocol documentation at
// https://chromedevtools.github.io/devtools-protocol/ for details of
// supported method calls and the expected "result" or "params" dictionary
// contents. JSON dictionaries can be parsed using the CefParseJSON function
// if desired, however be aware of performance considerations when parsing
// large messages (some of which may exceed 1MB in size).


It says that OnDevToolsMessageonly called if SendDevToolsMessage has been called.
It turns out OnDevToolsMessage is not related to the ExecuteDevToolsMethod() function??
Staxcelrom
Expert
 
Posts: 206
Joined: Wed Jan 26, 2022 8:20 am

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 37 guests