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=4a3d33abbaa00a373ea515338ed67d96708dbb9c$
|
2021-05-21 03:42:58 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/frame_handler_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
void CEF_CALLBACK
|
|
|
|
frame_handler_on_frame_created(struct _cef_frame_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
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: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
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);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
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
|
|
|
|
CefFrameHandlerCppToC::Get(self)->OnFrameCreated(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK
|
|
|
|
frame_handler_on_frame_attached(struct _cef_frame_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
2021-09-15 13:40:08 +02:00
|
|
|
cef_frame_t* frame,
|
|
|
|
int reattached) {
|
2021-05-21 03:42:58 +02:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
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: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
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);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
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
|
|
|
|
CefFrameHandlerCppToC::Get(self)->OnFrameAttached(
|
2021-09-15 13:40:08 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
|
|
|
|
reattached ? true : false);
|
2021-05-21 03:42:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK
|
|
|
|
frame_handler_on_frame_detached(struct _cef_frame_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* frame) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
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: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
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);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!frame) {
|
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
|
|
|
|
CefFrameHandlerCppToC::Get(self)->OnFrameDetached(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame));
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK
|
|
|
|
frame_handler_on_main_frame_changed(struct _cef_frame_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_frame_t* old_frame,
|
|
|
|
cef_frame_t* new_frame) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
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: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser) {
|
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
|
|
|
|
CefFrameHandlerCppToC::Get(self)->OnMainFrameChanged(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(old_frame),
|
|
|
|
CefFrameCToCpp::Wrap(new_frame));
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefFrameHandlerCppToC::CefFrameHandlerCppToC() {
|
|
|
|
GetStruct()->on_frame_created = frame_handler_on_frame_created;
|
|
|
|
GetStruct()->on_frame_attached = frame_handler_on_frame_attached;
|
|
|
|
GetStruct()->on_frame_detached = frame_handler_on_frame_detached;
|
|
|
|
GetStruct()->on_main_frame_changed = frame_handler_on_main_frame_changed;
|
|
|
|
}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefFrameHandlerCppToC::~CefFrameHandlerCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefRefPtr<CefFrameHandler> CefCppToCRefCounted<
|
|
|
|
CefFrameHandlerCppToC,
|
|
|
|
CefFrameHandler,
|
|
|
|
cef_frame_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_frame_handler_t* s) {
|
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 CefCppToCRefCounted<CefFrameHandlerCppToC,
|
|
|
|
CefFrameHandler,
|
|
|
|
cef_frame_handler_t>::kWrapperType =
|
|
|
|
WT_FRAME_HANDLER;
|