• 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=d76ba7de3a561c71b88250340676e56dc7a9f84a$
13 //
14 
15 #include "libcef_dll/cpptoc/run_context_menu_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
run_context_menu_callback_cont(struct _cef_run_context_menu_callback_t * self,int command_id,cef_event_flags_t event_flags)23 run_context_menu_callback_cont(struct _cef_run_context_menu_callback_t* self,
24                                int command_id,
25                                cef_event_flags_t event_flags) {
26   shutdown_checker::AssertNotShutdown();
27 
28   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
29 
30   DCHECK(self);
31   if (!self)
32     return;
33 
34   // Execute
35   CefRunContextMenuCallbackCppToC::Get(self)->Continue(command_id, event_flags);
36 }
37 
run_context_menu_callback_cancel(struct _cef_run_context_menu_callback_t * self)38 void CEF_CALLBACK run_context_menu_callback_cancel(
39     struct _cef_run_context_menu_callback_t* self) {
40   shutdown_checker::AssertNotShutdown();
41 
42   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
43 
44   DCHECK(self);
45   if (!self)
46     return;
47 
48   // Execute
49   CefRunContextMenuCallbackCppToC::Get(self)->Cancel();
50 }
51 
52 }  // namespace
53 
54 // CONSTRUCTOR - Do not edit by hand.
55 
CefRunContextMenuCallbackCppToC()56 CefRunContextMenuCallbackCppToC::CefRunContextMenuCallbackCppToC() {
57   GetStruct()->cont = run_context_menu_callback_cont;
58   GetStruct()->cancel = run_context_menu_callback_cancel;
59 }
60 
61 // DESTRUCTOR - Do not edit by hand.
62 
~CefRunContextMenuCallbackCppToC()63 CefRunContextMenuCallbackCppToC::~CefRunContextMenuCallbackCppToC() {
64   shutdown_checker::AssertNotShutdown();
65 }
66 
67 template <>
68 CefRefPtr<CefRunContextMenuCallback>
69 CefCppToCRefCounted<CefRunContextMenuCallbackCppToC,
70                     CefRunContextMenuCallback,
71                     cef_run_context_menu_callback_t>::
UnwrapDerived(CefWrapperType type,cef_run_context_menu_callback_t * s)72     UnwrapDerived(CefWrapperType type, cef_run_context_menu_callback_t* s) {
73   NOTREACHED() << "Unexpected class type: " << type;
74   return nullptr;
75 }
76 
77 template <>
78 CefWrapperType
79     CefCppToCRefCounted<CefRunContextMenuCallbackCppToC,
80                         CefRunContextMenuCallback,
81                         cef_run_context_menu_callback_t>::kWrapperType =
82         WT_RUN_CONTEXT_MENU_CALLBACK;
83