1 // Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 // 5 // --------------------------------------------------------------------------- 6 // 7 // This file was generated by the CEF translator tool. If making changes by 8 // hand only do so within the body of existing method and function 9 // implementations. See the translator.README.txt file in the tools directory 10 // for more information. 11 // 12 // $hash=77fee821efba296de9f9c01aa42f77596fb381d1$ 13 // 14 15 #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 16 #define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 17 #pragma once 18 19 #if !defined(WRAPPING_CEF_SHARED) 20 #error This file can be included wrapper-side only 21 #endif 22 23 #include "include/capi/cef_request_capi.h" 24 #include "include/cef_request.h" 25 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 26 27 // Wrap a C structure with a C++ class. 28 // This class may be instantiated and accessed wrapper-side only. 29 class CefRequestCToCpp 30 : public CefCToCppRefCounted<CefRequestCToCpp, CefRequest, cef_request_t> { 31 public: 32 CefRequestCToCpp(); 33 virtual ~CefRequestCToCpp(); 34 35 // CefRequest methods. 36 bool IsReadOnly() OVERRIDE; 37 CefString GetURL() OVERRIDE; 38 void SetURL(const CefString& url) OVERRIDE; 39 CefString GetMethod() OVERRIDE; 40 void SetMethod(const CefString& method) OVERRIDE; 41 void SetReferrer(const CefString& referrer_url, 42 ReferrerPolicy policy) OVERRIDE; 43 CefString GetReferrerURL() OVERRIDE; 44 ReferrerPolicy GetReferrerPolicy() OVERRIDE; 45 CefRefPtr<CefPostData> GetPostData() OVERRIDE; 46 void SetPostData(CefRefPtr<CefPostData> postData) OVERRIDE; 47 void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; 48 void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; 49 CefString GetHeaderByName(const CefString& name) OVERRIDE; 50 void SetHeaderByName(const CefString& name, 51 const CefString& value, 52 bool overwrite) OVERRIDE; 53 void Set(const CefString& url, 54 const CefString& method, 55 CefRefPtr<CefPostData> postData, 56 const HeaderMap& headerMap) OVERRIDE; 57 int GetFlags() OVERRIDE; 58 void SetFlags(int flags) OVERRIDE; 59 CefString GetFirstPartyForCookies() OVERRIDE; 60 void SetFirstPartyForCookies(const CefString& url) OVERRIDE; 61 ResourceType GetResourceType() OVERRIDE; 62 TransitionType GetTransitionType() OVERRIDE; 63 uint64 GetIdentifier() OVERRIDE; 64 }; 65 66 #endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 67