• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=31b2f537bea0b8088a861224b42c313ee87927d6$
13 //
14 
15 #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_
16 #define CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_
17 #pragma once
18 
19 #if !defined(BUILDING_CEF_SHARED)
20 #error This file can be included DLL-side only
21 #endif
22 
23 #include "include/capi/cef_urlrequest_capi.h"
24 #include "include/cef_urlrequest.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 DLL-side only.
29 class CefURLRequestClientCToCpp
30     : public CefCToCppRefCounted<CefURLRequestClientCToCpp,
31                                  CefURLRequestClient,
32                                  cef_urlrequest_client_t> {
33  public:
34   CefURLRequestClientCToCpp();
35   virtual ~CefURLRequestClientCToCpp();
36 
37   // CefURLRequestClient methods.
38   void OnRequestComplete(CefRefPtr<CefURLRequest> request) override;
39   void OnUploadProgress(CefRefPtr<CefURLRequest> request,
40                         int64 current,
41                         int64 total) override;
42   void OnDownloadProgress(CefRefPtr<CefURLRequest> request,
43                           int64 current,
44                           int64 total) override;
45   void OnDownloadData(CefRefPtr<CefURLRequest> request,
46                       const void* data,
47                       size_t data_length) override;
48   bool GetAuthCredentials(bool isProxy,
49                           const CefString& host,
50                           int port,
51                           const CefString& realm,
52                           const CefString& scheme,
53                           CefRefPtr<CefAuthCallback> callback) override;
54 };
55 
56 #endif  // CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_
57