Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@ -9,19 +9,22 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ab912d3ba520a44af12ce5d8a1c359c29f850c87$
//
#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK keyboard_handler_on_pre_key_event(
struct _cef_keyboard_handler_t* self, cef_browser_t* browser,
const struct _cef_key_event_t* event, cef_event_handle_t os_event,
int* is_keyboard_shortcut) {
int CEF_CALLBACK
keyboard_handler_on_pre_key_event(struct _cef_keyboard_handler_t* self,
cef_browser_t* browser,
const struct _cef_key_event_t* event,
cef_event_handle_t os_event,
int* is_keyboard_shortcut) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -45,27 +48,27 @@ int CEF_CALLBACK keyboard_handler_on_pre_key_event(
if (event)
eventObj.Set(*event, false);
// Translate param: is_keyboard_shortcut; type: bool_byaddr
bool is_keyboard_shortcutBool = (
is_keyboard_shortcut && *is_keyboard_shortcut)?true:false;
bool is_keyboard_shortcutBool =
(is_keyboard_shortcut && *is_keyboard_shortcut) ? true : false;
// Execute
bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnPreKeyEvent(
CefBrowserCToCpp::Wrap(browser),
eventObj,
os_event,
CefBrowserCToCpp::Wrap(browser), eventObj, os_event,
&is_keyboard_shortcutBool);
// Restore param: is_keyboard_shortcut; type: bool_byaddr
if (is_keyboard_shortcut)
*is_keyboard_shortcut = is_keyboard_shortcutBool?true:false;
*is_keyboard_shortcut = is_keyboard_shortcutBool ? true : false;
// Return type: bool
return _retval;
}
int CEF_CALLBACK keyboard_handler_on_key_event(
struct _cef_keyboard_handler_t* self, cef_browser_t* browser,
const struct _cef_key_event_t* event, cef_event_handle_t os_event) {
int CEF_CALLBACK
keyboard_handler_on_key_event(struct _cef_keyboard_handler_t* self,
cef_browser_t* browser,
const struct _cef_key_event_t* event,
cef_event_handle_t os_event) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -87,9 +90,7 @@ int CEF_CALLBACK keyboard_handler_on_key_event(
// Execute
bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnKeyEvent(
CefBrowserCToCpp::Wrap(browser),
eventObj,
os_event);
CefBrowserCToCpp::Wrap(browser), eventObj, os_event);
// Return type: bool
return _retval;
@ -97,7 +98,6 @@ int CEF_CALLBACK keyboard_handler_on_key_event(
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC() {
@ -105,18 +105,26 @@ CefKeyboardHandlerCppToC::CefKeyboardHandlerCppToC() {
GetStruct()->on_key_event = keyboard_handler_on_key_event;
}
template<> CefRefPtr<CefKeyboardHandler> CefCppToCRefCounted<CefKeyboardHandlerCppToC,
CefKeyboardHandler, cef_keyboard_handler_t>::UnwrapDerived(
CefWrapperType type, cef_keyboard_handler_t* s) {
template <>
CefRefPtr<CefKeyboardHandler> CefCppToCRefCounted<
CefKeyboardHandlerCppToC,
CefKeyboardHandler,
cef_keyboard_handler_t>::UnwrapDerived(CefWrapperType type,
cef_keyboard_handler_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
template<> base::AtomicRefCount CefCppToCRefCounted<CefKeyboardHandlerCppToC,
CefKeyboardHandler, cef_keyboard_handler_t>::DebugObjCt = 0;
template <>
base::AtomicRefCount CefCppToCRefCounted<CefKeyboardHandlerCppToC,
CefKeyboardHandler,
cef_keyboard_handler_t>::DebugObjCt =
0;
#endif
template<> CefWrapperType CefCppToCRefCounted<CefKeyboardHandlerCppToC,
CefKeyboardHandler, cef_keyboard_handler_t>::kWrapperType =
template <>
CefWrapperType CefCppToCRefCounted<CefKeyboardHandlerCppToC,
CefKeyboardHandler,
cef_keyboard_handler_t>::kWrapperType =
WT_KEYBOARD_HANDLER;