• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=bee998a59050e372ea10d1ce146532c074b1a3ec$
13 //
14 
15 #include "libcef_dll/cpptoc/request_callback_cpptoc.h"
16 #include "libcef_dll/shutdown_checker.h"
17 
18 namespace {
19 
20 // MEMBER FUNCTIONS - Body may be edited by hand.
21 
request_callback_cont(struct _cef_request_callback_t * self,int allow)22 void CEF_CALLBACK request_callback_cont(struct _cef_request_callback_t* self,
23                                         int allow) {
24   shutdown_checker::AssertNotShutdown();
25 
26   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
27 
28   DCHECK(self);
29   if (!self)
30     return;
31 
32   // Execute
33   CefRequestCallbackCppToC::Get(self)->Continue(allow ? true : false);
34 }
35 
36 void CEF_CALLBACK
request_callback_cancel(struct _cef_request_callback_t * self)37 request_callback_cancel(struct _cef_request_callback_t* self) {
38   shutdown_checker::AssertNotShutdown();
39 
40   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
41 
42   DCHECK(self);
43   if (!self)
44     return;
45 
46   // Execute
47   CefRequestCallbackCppToC::Get(self)->Cancel();
48 }
49 
50 }  // namespace
51 
52 // CONSTRUCTOR - Do not edit by hand.
53 
CefRequestCallbackCppToC()54 CefRequestCallbackCppToC::CefRequestCallbackCppToC() {
55   GetStruct()->cont = request_callback_cont;
56   GetStruct()->cancel = request_callback_cancel;
57 }
58 
59 // DESTRUCTOR - Do not edit by hand.
60 
~CefRequestCallbackCppToC()61 CefRequestCallbackCppToC::~CefRequestCallbackCppToC() {
62   shutdown_checker::AssertNotShutdown();
63 }
64 
65 template <>
66 CefRefPtr<CefRequestCallback> CefCppToCRefCounted<
67     CefRequestCallbackCppToC,
68     CefRequestCallback,
UnwrapDerived(CefWrapperType type,cef_request_callback_t * s)69     cef_request_callback_t>::UnwrapDerived(CefWrapperType type,
70                                            cef_request_callback_t* s) {
71   NOTREACHED() << "Unexpected class type: " << type;
72   return nullptr;
73 }
74 
75 template <>
76 CefWrapperType CefCppToCRefCounted<CefRequestCallbackCppToC,
77                                    CefRequestCallback,
78                                    cef_request_callback_t>::kWrapperType =
79     WT_REQUEST_CALLBACK;
80