• 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=f20a2530c9b5ad72cccd301ee4234a16132c487d$
13 //
14 
15 #include "libcef_dll/cpptoc/accessibility_handler_cpptoc.h"
16 #include "libcef_dll/ctocpp/value_ctocpp.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 namespace {
20 
21 // MEMBER FUNCTIONS - Body may be edited by hand.
22 
accessibility_handler_on_accessibility_tree_change(struct _cef_accessibility_handler_t * self,struct _cef_value_t * value)23 void CEF_CALLBACK accessibility_handler_on_accessibility_tree_change(
24     struct _cef_accessibility_handler_t* self,
25     struct _cef_value_t* value) {
26   shutdown_checker::AssertNotShutdown();
27 
28   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
29 
30   DCHECK(self);
31   if (!self)
32     return;
33   // Verify param: value; type: refptr_diff
34   DCHECK(value);
35   if (!value)
36     return;
37 
38   // Execute
39   CefAccessibilityHandlerCppToC::Get(self)->OnAccessibilityTreeChange(
40       CefValueCToCpp::Wrap(value));
41 }
42 
accessibility_handler_on_accessibility_location_change(struct _cef_accessibility_handler_t * self,struct _cef_value_t * value)43 void CEF_CALLBACK accessibility_handler_on_accessibility_location_change(
44     struct _cef_accessibility_handler_t* self,
45     struct _cef_value_t* value) {
46   shutdown_checker::AssertNotShutdown();
47 
48   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
49 
50   DCHECK(self);
51   if (!self)
52     return;
53   // Verify param: value; type: refptr_diff
54   DCHECK(value);
55   if (!value)
56     return;
57 
58   // Execute
59   CefAccessibilityHandlerCppToC::Get(self)->OnAccessibilityLocationChange(
60       CefValueCToCpp::Wrap(value));
61 }
62 
63 }  // namespace
64 
65 // CONSTRUCTOR - Do not edit by hand.
66 
CefAccessibilityHandlerCppToC()67 CefAccessibilityHandlerCppToC::CefAccessibilityHandlerCppToC() {
68   GetStruct()->on_accessibility_tree_change =
69       accessibility_handler_on_accessibility_tree_change;
70   GetStruct()->on_accessibility_location_change =
71       accessibility_handler_on_accessibility_location_change;
72 }
73 
74 // DESTRUCTOR - Do not edit by hand.
75 
~CefAccessibilityHandlerCppToC()76 CefAccessibilityHandlerCppToC::~CefAccessibilityHandlerCppToC() {
77   shutdown_checker::AssertNotShutdown();
78 }
79 
80 template <>
81 CefRefPtr<CefAccessibilityHandler> CefCppToCRefCounted<
82     CefAccessibilityHandlerCppToC,
83     CefAccessibilityHandler,
UnwrapDerived(CefWrapperType type,cef_accessibility_handler_t * s)84     cef_accessibility_handler_t>::UnwrapDerived(CefWrapperType type,
85                                                 cef_accessibility_handler_t*
86                                                     s) {
87   NOTREACHED() << "Unexpected class type: " << type;
88   return nullptr;
89 }
90 
91 template <>
92 CefWrapperType CefCppToCRefCounted<CefAccessibilityHandlerCppToC,
93                                    CefAccessibilityHandler,
94                                    cef_accessibility_handler_t>::kWrapperType =
95     WT_ACCESSIBILITY_HANDLER;
96