mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@ -9,21 +9,26 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=04255b222eef72aeea67720233b7b0b7b9000365$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK jsdialog_handler_on_jsdialog(
|
||||
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
|
||||
const cef_string_t* origin_url, cef_jsdialog_type_t dialog_type,
|
||||
const cef_string_t* message_text, const cef_string_t* default_prompt_text,
|
||||
cef_jsdialog_callback_t* callback, int* suppress_message) {
|
||||
int CEF_CALLBACK
|
||||
jsdialog_handler_on_jsdialog(struct _cef_jsdialog_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
const cef_string_t* origin_url,
|
||||
cef_jsdialog_type_t dialog_type,
|
||||
const cef_string_t* message_text,
|
||||
const cef_string_t* default_prompt_text,
|
||||
cef_jsdialog_callback_t* callback,
|
||||
int* suppress_message) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -44,31 +49,29 @@ int CEF_CALLBACK jsdialog_handler_on_jsdialog(
|
||||
// Unverified params: origin_url, message_text, default_prompt_text
|
||||
|
||||
// Translate param: suppress_message; type: bool_byref
|
||||
bool suppress_messageBool = (
|
||||
suppress_message && *suppress_message)?true:false;
|
||||
bool suppress_messageBool =
|
||||
(suppress_message && *suppress_message) ? true : false;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnJSDialog(
|
||||
CefBrowserCToCpp::Wrap(browser),
|
||||
CefString(origin_url),
|
||||
dialog_type,
|
||||
CefString(message_text),
|
||||
CefString(default_prompt_text),
|
||||
CefJSDialogCallbackCToCpp::Wrap(callback),
|
||||
suppress_messageBool);
|
||||
CefBrowserCToCpp::Wrap(browser), CefString(origin_url), dialog_type,
|
||||
CefString(message_text), CefString(default_prompt_text),
|
||||
CefJSDialogCallbackCToCpp::Wrap(callback), suppress_messageBool);
|
||||
|
||||
// Restore param: suppress_message; type: bool_byref
|
||||
if (suppress_message)
|
||||
*suppress_message = suppress_messageBool?true:false;
|
||||
*suppress_message = suppress_messageBool ? true : false;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK jsdialog_handler_on_before_unload_dialog(
|
||||
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser,
|
||||
const cef_string_t* message_text, int is_reload,
|
||||
cef_jsdialog_callback_t* callback) {
|
||||
int CEF_CALLBACK
|
||||
jsdialog_handler_on_before_unload_dialog(struct _cef_jsdialog_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
const cef_string_t* message_text,
|
||||
int is_reload,
|
||||
cef_jsdialog_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -86,17 +89,16 @@ int CEF_CALLBACK jsdialog_handler_on_before_unload_dialog(
|
||||
|
||||
// Execute
|
||||
bool _retval = CefJSDialogHandlerCppToC::Get(self)->OnBeforeUnloadDialog(
|
||||
CefBrowserCToCpp::Wrap(browser),
|
||||
CefString(message_text),
|
||||
is_reload?true:false,
|
||||
CefJSDialogCallbackCToCpp::Wrap(callback));
|
||||
CefBrowserCToCpp::Wrap(browser), CefString(message_text),
|
||||
is_reload ? true : false, CefJSDialogCallbackCToCpp::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK jsdialog_handler_on_reset_dialog_state(
|
||||
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser) {
|
||||
void CEF_CALLBACK
|
||||
jsdialog_handler_on_reset_dialog_state(struct _cef_jsdialog_handler_t* self,
|
||||
cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -112,8 +114,9 @@ void CEF_CALLBACK jsdialog_handler_on_reset_dialog_state(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK jsdialog_handler_on_dialog_closed(
|
||||
struct _cef_jsdialog_handler_t* self, cef_browser_t* browser) {
|
||||
void CEF_CALLBACK
|
||||
jsdialog_handler_on_dialog_closed(struct _cef_jsdialog_handler_t* self,
|
||||
cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@ -131,7 +134,6 @@ void CEF_CALLBACK jsdialog_handler_on_dialog_closed(
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC() {
|
||||
@ -142,18 +144,26 @@ CefJSDialogHandlerCppToC::CefJSDialogHandlerCppToC() {
|
||||
GetStruct()->on_dialog_closed = jsdialog_handler_on_dialog_closed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefJSDialogHandler> CefCppToCRefCounted<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_jsdialog_handler_t* s) {
|
||||
template <>
|
||||
CefRefPtr<CefJSDialogHandler> CefCppToCRefCounted<
|
||||
CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler,
|
||||
cef_jsdialog_handler_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_jsdialog_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCppToCRefCounted<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::DebugObjCt = 0;
|
||||
template <>
|
||||
base::AtomicRefCount CefCppToCRefCounted<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler,
|
||||
cef_jsdialog_handler_t>::DebugObjCt =
|
||||
0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToCRefCounted<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler, cef_jsdialog_handler_t>::kWrapperType =
|
||||
template <>
|
||||
CefWrapperType CefCppToCRefCounted<CefJSDialogHandlerCppToC,
|
||||
CefJSDialogHandler,
|
||||
cef_jsdialog_handler_t>::kWrapperType =
|
||||
WT_JSDIALOG_HANDLER;
|
||||
|
Reference in New Issue
Block a user