• 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=022bd3d1f8fd0eb3de156647dd4f50d688747534$
13  //
14  
15  #include "libcef_dll/cpptoc/find_handler_cpptoc.h"
16  #include "libcef_dll/ctocpp/browser_ctocpp.h"
17  #include "libcef_dll/shutdown_checker.h"
18  
19  namespace {
20  
21  // MEMBER FUNCTIONS - Body may be edited by hand.
22  
find_handler_on_find_result(struct _cef_find_handler_t * self,cef_browser_t * browser,int identifier,int count,const cef_rect_t * selectionRect,int activeMatchOrdinal,int finalUpdate)23  void CEF_CALLBACK find_handler_on_find_result(struct _cef_find_handler_t* self,
24                                                cef_browser_t* browser,
25                                                int identifier,
26                                                int count,
27                                                const cef_rect_t* selectionRect,
28                                                int activeMatchOrdinal,
29                                                int finalUpdate) {
30    shutdown_checker::AssertNotShutdown();
31  
32    // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
33  
34    DCHECK(self);
35    if (!self)
36      return;
37    // Verify param: browser; type: refptr_diff
38    DCHECK(browser);
39    if (!browser)
40      return;
41    // Verify param: selectionRect; type: simple_byref_const
42    DCHECK(selectionRect);
43    if (!selectionRect)
44      return;
45  
46    // Translate param: selectionRect; type: simple_byref_const
47    CefRect selectionRectVal = selectionRect ? *selectionRect : CefRect();
48  
49    // Execute
50    CefFindHandlerCppToC::Get(self)->OnFindResult(
51        CefBrowserCToCpp::Wrap(browser), identifier, count, selectionRectVal,
52        activeMatchOrdinal, finalUpdate ? true : false);
53  }
54  
55  }  // namespace
56  
57  // CONSTRUCTOR - Do not edit by hand.
58  
CefFindHandlerCppToC()59  CefFindHandlerCppToC::CefFindHandlerCppToC() {
60    GetStruct()->on_find_result = find_handler_on_find_result;
61  }
62  
63  // DESTRUCTOR - Do not edit by hand.
64  
~CefFindHandlerCppToC()65  CefFindHandlerCppToC::~CefFindHandlerCppToC() {
66    shutdown_checker::AssertNotShutdown();
67  }
68  
69  template <>
70  CefRefPtr<CefFindHandler>
71  CefCppToCRefCounted<CefFindHandlerCppToC, CefFindHandler, cef_find_handler_t>::
UnwrapDerived(CefWrapperType type,cef_find_handler_t * s)72      UnwrapDerived(CefWrapperType type, cef_find_handler_t* s) {
73    NOTREACHED() << "Unexpected class type: " << type;
74    return nullptr;
75  }
76  
77  template <>
78  CefWrapperType CefCppToCRefCounted<CefFindHandlerCppToC,
79                                     CefFindHandler,
80                                     cef_find_handler_t>::kWrapperType =
81      WT_FIND_HANDLER;
82