2013-01-17 19:39:09 +01:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
2011-02-09 23:04:35 +01:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
2011-12-08 02:38:30 +01:00
|
|
|
// 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
|
2011-02-09 23:04:35 +01:00
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/web_urlrequest_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/web_urlrequest_client_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CEF_EXPORT cef_web_urlrequest_t* cef_web_urlrequest_create(
|
2012-01-10 00:46:23 +01:00
|
|
|
cef_request_t* request, struct _cef_web_urlrequest_client_t* client) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: request; type: refptr_same
|
|
|
|
DCHECK(request);
|
|
|
|
if (!request)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: client; type: refptr_diff
|
|
|
|
DCHECK(client);
|
|
|
|
if (!client)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefWebURLRequest> _retval = CefWebURLRequest::CreateWebURLRequest(
|
|
|
|
CefRequestCppToC::Unwrap(request),
|
|
|
|
CefWebURLRequestClientCToCpp::Wrap(client));
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefWebURLRequestCppToC::Wrap(_retval);
|
2011-02-09 23:04:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CEF_CALLBACK web_urlrequest_cancel(struct _cef_web_urlrequest_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-09 23:04:35 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-09 23:04:35 +01:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
2011-02-09 23:04:35 +01:00
|
|
|
CefWebURLRequestCppToC::Get(self)->Cancel();
|
|
|
|
}
|
|
|
|
|
|
|
|
enum cef_weburlrequest_state_t CEF_CALLBACK web_urlrequest_get_state(
|
2012-01-10 00:46:23 +01:00
|
|
|
struct _cef_web_urlrequest_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-09 23:04:35 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-09 23:04:35 +01:00
|
|
|
return WUR_STATE_UNSENT;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
cef_weburlrequest_state_t _retval = CefWebURLRequestCppToC::Get(
|
|
|
|
self)->GetState();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
2011-02-09 23:04:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefWebURLRequestCppToC::CefWebURLRequestCppToC(CefWebURLRequest* cls)
|
|
|
|
: CefCppToC<CefWebURLRequestCppToC, CefWebURLRequest, cef_web_urlrequest_t>(
|
2012-01-10 00:46:23 +01:00
|
|
|
cls) {
|
2011-02-09 23:04:35 +01:00
|
|
|
struct_.struct_.cancel = web_urlrequest_cancel;
|
|
|
|
struct_.struct_.get_state = web_urlrequest_get_state;
|
|
|
|
}
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
#ifndef NDEBUG
|
2011-02-09 23:04:35 +01:00
|
|
|
template<> long CefCppToC<CefWebURLRequestCppToC, CefWebURLRequest,
|
|
|
|
cef_web_urlrequest_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|