• 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=99f02c8911b913161cfd3834e19bbdc0ba542409$
13 //
14 
15 #include "libcef_dll/cpptoc/set_cookie_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
set_cookie_callback_on_complete(struct _cef_set_cookie_callback_t * self,int success)23 set_cookie_callback_on_complete(struct _cef_set_cookie_callback_t* self,
24                                 int success) {
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   CefSetCookieCallbackCppToC::Get(self)->OnComplete(success ? true : false);
35 }
36 
37 }  // namespace
38 
39 // CONSTRUCTOR - Do not edit by hand.
40 
CefSetCookieCallbackCppToC()41 CefSetCookieCallbackCppToC::CefSetCookieCallbackCppToC() {
42   GetStruct()->on_complete = set_cookie_callback_on_complete;
43 }
44 
45 // DESTRUCTOR - Do not edit by hand.
46 
~CefSetCookieCallbackCppToC()47 CefSetCookieCallbackCppToC::~CefSetCookieCallbackCppToC() {
48   shutdown_checker::AssertNotShutdown();
49 }
50 
51 template <>
52 CefRefPtr<CefSetCookieCallback> CefCppToCRefCounted<
53     CefSetCookieCallbackCppToC,
54     CefSetCookieCallback,
UnwrapDerived(CefWrapperType type,cef_set_cookie_callback_t * s)55     cef_set_cookie_callback_t>::UnwrapDerived(CefWrapperType type,
56                                               cef_set_cookie_callback_t* s) {
57   NOTREACHED() << "Unexpected class type: " << type;
58   return nullptr;
59 }
60 
61 template <>
62 CefWrapperType CefCppToCRefCounted<CefSetCookieCallbackCppToC,
63                                    CefSetCookieCallback,
64                                    cef_set_cookie_callback_t>::kWrapperType =
65     WT_SET_COOKIE_CALLBACK;
66