2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2021-05-21 03:42:58 +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=0074492ed580ccc06962a05b6c72bdabae182a51$
|
2021-05-21 03:42:58 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/frame_handler_ctocpp.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2021-05-21 03:42:58 +02:00
|
|
|
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefFrameHandlerCToCpp::OnFrameCreated(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_frame_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_frame_created)) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_frame_created(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame));
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefFrameHandlerCToCpp::OnFrameAttached(CefRefPtr<CefBrowser> browser,
|
2021-09-15 13:40:08 +02:00
|
|
|
CefRefPtr<CefFrame> frame,
|
|
|
|
bool reattached) {
|
2021-05-21 03:42:58 +02:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_frame_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_frame_attached)) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_frame_attached(_struct, CefBrowserCppToC::Wrap(browser),
|
2021-09-15 13:40:08 +02:00
|
|
|
CefFrameCppToC::Wrap(frame), reattached);
|
2021-05-21 03:42:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefFrameHandlerCToCpp::OnFrameDetached(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> frame) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_frame_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_frame_detached)) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
// Verify param: frame; type: refptr_diff
|
|
|
|
DCHECK(frame.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_frame_detached(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(frame));
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefFrameHandlerCToCpp::OnMainFrameChanged(CefRefPtr<CefBrowser> browser,
|
|
|
|
CefRefPtr<CefFrame> old_frame,
|
|
|
|
CefRefPtr<CefFrame> new_frame) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_frame_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_main_frame_changed)) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2021-05-21 03:42:58 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2021-05-21 03:42:58 +02:00
|
|
|
// Unverified params: old_frame, new_frame
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_main_frame_changed(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefFrameCppToC::Wrap(old_frame),
|
|
|
|
CefFrameCppToC::Wrap(new_frame));
|
|
|
|
}
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefFrameHandlerCToCpp::CefFrameHandlerCToCpp() {}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefFrameHandlerCToCpp::~CefFrameHandlerCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
cef_frame_handler_t*
|
|
|
|
CefCToCppRefCounted<CefFrameHandlerCToCpp,
|
|
|
|
CefFrameHandler,
|
|
|
|
cef_frame_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefFrameHandler* c) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2021-05-21 03:42:58 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefFrameHandlerCToCpp,
|
|
|
|
CefFrameHandler,
|
|
|
|
cef_frame_handler_t>::kWrapperType =
|
|
|
|
WT_FRAME_HANDLER;
|