1 // Copyright (c) 2022 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=6a1638068718eb98ce3311395809c7da4c9f7422$ 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