2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2020-06-13 02:54:08 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2024-01-05 19:03:36 +01:00
|
|
|
// $hash=28fb82efb43251449255e957b818bad7fe520728$
|
2020-06-13 02:54:08 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2020-06-13 02:54:08 +02:00
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
int CEF_CALLBACK dev_tools_message_observer_on_dev_tools_message(
|
|
|
|
struct _cef_dev_tools_message_observer_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const void* message,
|
|
|
|
size_t message_size) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: message; type: simple_byaddr
|
|
|
|
DCHECK(message);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!message) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefDevToolsMessageObserverCppToC::Get(self)->OnDevToolsMessage(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), message, message_size);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK dev_tools_message_observer_on_dev_tools_method_result(
|
|
|
|
struct _cef_dev_tools_message_observer_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
int message_id,
|
|
|
|
int success,
|
|
|
|
const void* result,
|
|
|
|
size_t result_size) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Unverified params: result
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefDevToolsMessageObserverCppToC::Get(self)->OnDevToolsMethodResult(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), message_id, success ? true : false,
|
|
|
|
result, result_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK dev_tools_message_observer_on_dev_tools_event(
|
|
|
|
struct _cef_dev_tools_message_observer_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_string_t* method,
|
|
|
|
const void* params,
|
|
|
|
size_t params_size) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: method; type: string_byref_const
|
|
|
|
DCHECK(method);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!method) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Unverified params: params
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefDevToolsMessageObserverCppToC::Get(self)->OnDevToolsEvent(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefString(method), params, params_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK dev_tools_message_observer_on_dev_tools_agent_attached(
|
|
|
|
struct _cef_dev_tools_message_observer_t* self,
|
|
|
|
cef_browser_t* browser) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefDevToolsMessageObserverCppToC::Get(self)->OnDevToolsAgentAttached(
|
|
|
|
CefBrowserCToCpp::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK dev_tools_message_observer_on_dev_tools_agent_detached(
|
|
|
|
struct _cef_dev_tools_message_observer_t* self,
|
|
|
|
cef_browser_t* browser) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
2020-06-13 02:54:08 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-06-13 02:54:08 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefDevToolsMessageObserverCppToC::Get(self)->OnDevToolsAgentDetached(
|
|
|
|
CefBrowserCToCpp::Wrap(browser));
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefDevToolsMessageObserverCppToC::CefDevToolsMessageObserverCppToC() {
|
|
|
|
GetStruct()->on_dev_tools_message =
|
|
|
|
dev_tools_message_observer_on_dev_tools_message;
|
|
|
|
GetStruct()->on_dev_tools_method_result =
|
|
|
|
dev_tools_message_observer_on_dev_tools_method_result;
|
|
|
|
GetStruct()->on_dev_tools_event =
|
|
|
|
dev_tools_message_observer_on_dev_tools_event;
|
|
|
|
GetStruct()->on_dev_tools_agent_attached =
|
|
|
|
dev_tools_message_observer_on_dev_tools_agent_attached;
|
|
|
|
GetStruct()->on_dev_tools_agent_detached =
|
|
|
|
dev_tools_message_observer_on_dev_tools_agent_detached;
|
|
|
|
}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefDevToolsMessageObserverCppToC::~CefDevToolsMessageObserverCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefRefPtr<CefDevToolsMessageObserver>
|
|
|
|
CefCppToCRefCounted<CefDevToolsMessageObserverCppToC,
|
|
|
|
CefDevToolsMessageObserver,
|
|
|
|
cef_dev_tools_message_observer_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, cef_dev_tools_message_observer_t* s) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-06-13 02:54:08 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefWrapperType
|
|
|
|
CefCppToCRefCounted<CefDevToolsMessageObserverCppToC,
|
|
|
|
CefDevToolsMessageObserver,
|
|
|
|
cef_dev_tools_message_observer_t>::kWrapperType =
|
|
|
|
WT_DEV_TOOLS_MESSAGE_OBSERVER;
|