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

@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=b6cbe39a8124a961036205864e7e6b2e1eb0bf6b$
//
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_
@ -53,7 +55,6 @@
extern "C" {
#endif
///
// Callback structure used for asynchronous continuation of url requests.
///
@ -67,15 +68,14 @@ typedef struct _cef_request_callback_t {
// Continue the url request. If |allow| is true (1) the request will be
// continued. Otherwise, the request will be canceled.
///
void (CEF_CALLBACK *cont)(struct _cef_request_callback_t* self, int allow);
void(CEF_CALLBACK* cont)(struct _cef_request_callback_t* self, int allow);
///
// Cancel the url request.
///
void (CEF_CALLBACK *cancel)(struct _cef_request_callback_t* self);
void(CEF_CALLBACK* cancel)(struct _cef_request_callback_t* self);
} cef_request_callback_t;
///
// Callback structure used to select a client certificate for authentication.
///
@ -89,12 +89,11 @@ typedef struct _cef_select_client_certificate_callback_t {
// Chooses the specified certificate for client certificate authentication.
// NULL value means that no client certificate should be used.
///
void (CEF_CALLBACK *select)(
void(CEF_CALLBACK* select)(
struct _cef_select_client_certificate_callback_t* self,
struct _cef_x509certificate_t* cert);
} cef_select_client_certificate_callback_t;
///
// Implement this structure to handle events related to browser requests. The
// functions of this structure will be called on the thread indicated.
@ -115,9 +114,11 @@ typedef struct _cef_request_handler_t {
// cef_load_handler_t::OnLoadError will be called with an |errorCode| value of
// ERR_ABORTED.
///
int (CEF_CALLBACK *on_before_browse)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, int is_redirect);
int(CEF_CALLBACK* on_before_browse)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
int is_redirect);
///
// Called on the UI thread before OnBeforeBrowse in certain limited cases
@ -135,10 +136,13 @@ typedef struct _cef_request_handler_t {
// true (1) to cancel the navigation or false (0) to allow the navigation to
// proceed in the source browser's top-level frame.
///
int (CEF_CALLBACK *on_open_urlfrom_tab)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
int(CEF_CALLBACK* on_open_urlfrom_tab)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
const cef_string_t* target_url,
cef_window_open_disposition_t target_disposition, int user_gesture);
cef_window_open_disposition_t target_disposition,
int user_gesture);
///
// Called on the IO thread before a resource request is loaded. The |request|
@ -148,9 +152,11 @@ typedef struct _cef_request_handler_t {
// Return RV_CANCEL to cancel the request immediately.
//
///
cef_return_value_t (CEF_CALLBACK *on_before_resource_load)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
cef_return_value_t(CEF_CALLBACK* on_before_resource_load)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_request_callback_t* callback);
///
@ -159,9 +165,11 @@ typedef struct _cef_request_handler_t {
// a cef_resource_handler_t object. The |request| object should not be
// modified in this callback.
///
struct _cef_resource_handler_t* (CEF_CALLBACK *get_resource_handler)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request);
struct _cef_resource_handler_t*(CEF_CALLBACK* get_resource_handler)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request);
///
// Called on the IO thread when a resource load is redirected. The |request|
@ -171,10 +179,12 @@ typedef struct _cef_request_handler_t {
// changed if desired. The |request| object cannot be modified in this
// callback.
///
void (CEF_CALLBACK *on_resource_redirect)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, struct _cef_response_t* response,
cef_string_t* new_url);
void(CEF_CALLBACK* on_resource_redirect)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response,
cef_string_t* new_url);
///
// Called on the IO thread when a resource response is received. To allow the
@ -182,18 +192,22 @@ typedef struct _cef_request_handler_t {
// resource modify |request| (url, headers or post body) and return true (1).
// The |response| object cannot be modified in this callback.
///
int (CEF_CALLBACK *on_resource_response)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request, struct _cef_response_t* response);
int(CEF_CALLBACK* on_resource_response)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response);
///
// Called on the IO thread to optionally filter resource response content.
// |request| and |response| represent the request and response respectively
// and cannot be modified in this callback.
///
struct _cef_response_filter_t* (CEF_CALLBACK *get_resource_response_filter)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
struct _cef_response_filter_t*(CEF_CALLBACK* get_resource_response_filter)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response);
///
@ -202,10 +216,13 @@ typedef struct _cef_request_handler_t {
// modified in this callback. |status| indicates the load completion status.
// |received_content_length| is the number of response bytes actually read.
///
void (CEF_CALLBACK *on_resource_load_complete)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
struct _cef_response_t* response, cef_urlrequest_status_t status,
void(CEF_CALLBACK* on_resource_load_complete)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
struct _cef_request_t* request,
struct _cef_response_t* response,
cef_urlrequest_status_t status,
int64 received_content_length);
///
@ -219,10 +236,16 @@ typedef struct _cef_request_handler_t {
// the authentication information is available. Return false (0) to cancel the
// request immediately.
///
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
const cef_string_t* host, int port, const cef_string_t* realm,
const cef_string_t* scheme, struct _cef_auth_callback_t* callback);
int(CEF_CALLBACK* get_auth_credentials)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
struct _cef_frame_t* frame,
int isProxy,
const cef_string_t* host,
int port,
const cef_string_t* realm,
const cef_string_t* scheme,
struct _cef_auth_callback_t* callback);
///
// Called on the IO thread when JavaScript requests a specific storage quota
@ -233,9 +256,11 @@ typedef struct _cef_request_handler_t {
// grant or deny the request. Return false (0) to cancel the request
// immediately.
///
int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* origin_url,
int64 new_size, struct _cef_request_callback_t* callback);
int(CEF_CALLBACK* on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* origin_url,
int64 new_size,
struct _cef_request_callback_t* callback);
///
// Called on the UI thread to handle requests for URLs with an unknown
@ -244,9 +269,10 @@ typedef struct _cef_request_handler_t {
// YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR
// OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
///
void (CEF_CALLBACK *on_protocol_execution)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
const cef_string_t* url, int* allow_os_execution);
void(CEF_CALLBACK* on_protocol_execution)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* url,
int* allow_os_execution);
///
// Called on the UI thread to handle requests for URLs with an invalid SSL
@ -256,9 +282,12 @@ typedef struct _cef_request_handler_t {
// CefSettings.ignore_certificate_errors is set all invalid certificates will
// be accepted without calling this function.
///
int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, cef_errorcode_t cert_error,
const cef_string_t* request_url, struct _cef_sslinfo_t* ssl_info,
int(CEF_CALLBACK* on_certificate_error)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
cef_errorcode_t cert_error,
const cef_string_t* request_url,
struct _cef_sslinfo_t* ssl_info,
struct _cef_request_callback_t* callback);
///
@ -274,9 +303,12 @@ typedef struct _cef_request_handler_t {
// pruned by Chromium so that it only contains certificates from issuers that
// the server trusts.
///
int (CEF_CALLBACK *on_select_client_certificate)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
int isProxy, const cef_string_t* host, int port,
int(CEF_CALLBACK* on_select_client_certificate)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
int isProxy,
const cef_string_t* host,
int port,
size_t certificatesCount,
struct _cef_x509certificate_t* const* certificates,
struct _cef_select_client_certificate_callback_t* callback);
@ -285,27 +317,28 @@ typedef struct _cef_request_handler_t {
// Called on the browser process UI thread when a plugin has crashed.
// |plugin_path| is the path of the plugin that crashed.
///
void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* plugin_path);
void(CEF_CALLBACK* on_plugin_crashed)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
const cef_string_t* plugin_path);
///
// Called on the browser process UI thread when the render view associated
// with |browser| is ready to receive/handle IPC messages in the render
// process.
///
void (CEF_CALLBACK *on_render_view_ready)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser);
void(CEF_CALLBACK* on_render_view_ready)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser);
///
// Called on the browser process UI thread when the render process terminates
// unexpectedly. |status| indicates how the process terminated.
///
void (CEF_CALLBACK *on_render_process_terminated)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
void(CEF_CALLBACK* on_render_process_terminated)(
struct _cef_request_handler_t* self,
struct _cef_browser_t* browser,
cef_termination_status_t status);
} cef_request_handler_t;
#ifdef __cplusplus
}
#endif