• 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=9d07f53404d3b90d1e386e37b0ed4535afb57b39$
13 //
14 
15 #include "libcef_dll/cpptoc/resource_read_callback_cpptoc.h"
16 #include "libcef_dll/shutdown_checker.h"
17 
18 namespace {
19 
20 // MEMBER FUNCTIONS - Body may be edited by hand.
21 
22 void CEF_CALLBACK
resource_read_callback_cont(struct _cef_resource_read_callback_t * self,int bytes_read)23 resource_read_callback_cont(struct _cef_resource_read_callback_t* self,
24                             int bytes_read) {
25   shutdown_checker::AssertNotShutdown();
26 
27   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
28 
29   DCHECK(self);
30   if (!self)
31     return;
32 
33   // Execute
34   CefResourceReadCallbackCppToC::Get(self)->Continue(bytes_read);
35 }
36 
37 }  // namespace
38 
39 // CONSTRUCTOR - Do not edit by hand.
40 
CefResourceReadCallbackCppToC()41 CefResourceReadCallbackCppToC::CefResourceReadCallbackCppToC() {
42   GetStruct()->cont = resource_read_callback_cont;
43 }
44 
45 // DESTRUCTOR - Do not edit by hand.
46 
~CefResourceReadCallbackCppToC()47 CefResourceReadCallbackCppToC::~CefResourceReadCallbackCppToC() {
48   shutdown_checker::AssertNotShutdown();
49 }
50 
51 template <>
52 CefRefPtr<CefResourceReadCallback> CefCppToCRefCounted<
53     CefResourceReadCallbackCppToC,
54     CefResourceReadCallback,
UnwrapDerived(CefWrapperType type,cef_resource_read_callback_t * s)55     cef_resource_read_callback_t>::UnwrapDerived(CefWrapperType type,
56                                                  cef_resource_read_callback_t*
57                                                      s) {
58   NOTREACHED() << "Unexpected class type: " << type;
59   return nullptr;
60 }
61 
62 template <>
63 CefWrapperType CefCppToCRefCounted<CefResourceReadCallbackCppToC,
64                                    CefResourceReadCallback,
65                                    cef_resource_read_callback_t>::kWrapperType =
66     WT_RESOURCE_READ_CALLBACK;
67