Chromium Embedded Framework (CEF)
122.1.5+gf09a9bc+chromium-122.0.6261.29
|
Callback interface for CefBrowserHost::AddDevToolsMessageObserver. More...
#include "include/cef_devtools_message_observer.h"
Public Member Functions | |
virtual bool | OnDevToolsMessage (CefRefPtr< CefBrowser > browser, const void *message, size_t message_size) |
Method that will be called on receipt of a DevTools protocol message. More... | |
virtual void | OnDevToolsMethodResult (CefRefPtr< CefBrowser > browser, int message_id, bool success, const void *result, size_t result_size) |
Method that will be called after attempted execution of a DevTools protocol method. More... | |
virtual void | OnDevToolsEvent (CefRefPtr< CefBrowser > browser, const CefString &method, const void *params, size_t params_size) |
Method that will be called on receipt of a DevTools protocol event. More... | |
virtual void | OnDevToolsAgentAttached (CefRefPtr< CefBrowser > browser) |
Method that will be called when the DevTools agent has attached. More... | |
virtual void | OnDevToolsAgentDetached (CefRefPtr< CefBrowser > browser) |
Method that will be called when the DevTools agent has detached. More... | |
Public Member Functions inherited from CefBaseRefCounted | |
virtual void | AddRef () const =0 |
Called to increment the reference count for the object. More... | |
virtual bool | Release () const =0 |
Called to decrement the reference count for the object. More... | |
virtual bool | HasOneRef () const =0 |
Returns true if the reference count is 1. More... | |
virtual bool | HasAtLeastOneRef () const =0 |
Returns true if the reference count is at least 1. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CefBaseRefCounted | |
virtual | ~CefBaseRefCounted () |
Callback interface for CefBrowserHost::AddDevToolsMessageObserver.
The methods of this class will be called on the browser process UI thread.
|
inlinevirtual |
Method that will be called when the DevTools agent has attached.
|browser| is the originating browser instance. This will generally occur in response to the first message sent while the agent is detached.
|
inlinevirtual |
Method that will be called when the DevTools agent has detached.
|browser| is the originating browser instance. Any method results that were pending before the agent became detached will not be delivered, and any active event subscriptions will be canceled.
|
inlinevirtual |
Method that will be called on receipt of a DevTools protocol event.
|browser| is the originating browser instance. |method| is the "method" value. |params| is the UTF8-encoded JSON "params" dictionary value (which may be empty). |params| is only valid for the scope of this callback and should be copied if necessary. See the OnDevToolsMessage documentation for additional details on |params| contents.
|
inlinevirtual |
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).
|
inlinevirtual |
Method that will be called after attempted execution of a DevTools protocol method.
|browser| is the originating browser instance. |message_id| is the "id" value that identifies the originating method call message. If the method succeeded |success| will be true and |result| will be the UTF8-encoded JSON "result" dictionary value (which may be empty). If the method failed |success| will be false and |result| will be the UTF8-encoded JSON "error" dictionary value. |result| is only valid for the scope of this callback and should be copied if necessary. See the OnDevToolsMessage documentation for additional details on |result| contents.