• 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=22af1e946668e89411cc87596b88c8a47880a78a$
13 //
14 
15 #include "libcef_dll/ctocpp/find_handler_ctocpp.h"
16 #include "libcef_dll/cpptoc/browser_cpptoc.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 // VIRTUAL METHODS - Body may be edited by hand.
20 
21 NO_SANITIZE("cfi-icall")
OnFindResult(CefRefPtr<CefBrowser> browser,int identifier,int count,const CefRect & selectionRect,int activeMatchOrdinal,bool finalUpdate)22 void CefFindHandlerCToCpp::OnFindResult(CefRefPtr<CefBrowser> browser,
23                                         int identifier,
24                                         int count,
25                                         const CefRect& selectionRect,
26                                         int activeMatchOrdinal,
27                                         bool finalUpdate) {
28   shutdown_checker::AssertNotShutdown();
29 
30   cef_find_handler_t* _struct = GetStruct();
31   if (CEF_MEMBER_MISSING(_struct, on_find_result))
32     return;
33 
34   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
35 
36   // Verify param: browser; type: refptr_diff
37   DCHECK(browser.get());
38   if (!browser.get())
39     return;
40 
41   // Execute
42   _struct->on_find_result(_struct, CefBrowserCppToC::Wrap(browser), identifier,
43                           count, &selectionRect, activeMatchOrdinal,
44                           finalUpdate);
45 }
46 
47 // CONSTRUCTOR - Do not edit by hand.
48 
CefFindHandlerCToCpp()49 CefFindHandlerCToCpp::CefFindHandlerCToCpp() {}
50 
51 // DESTRUCTOR - Do not edit by hand.
52 
~CefFindHandlerCToCpp()53 CefFindHandlerCToCpp::~CefFindHandlerCToCpp() {
54   shutdown_checker::AssertNotShutdown();
55 }
56 
57 template <>
58 cef_find_handler_t*
59 CefCToCppRefCounted<CefFindHandlerCToCpp, CefFindHandler, cef_find_handler_t>::
UnwrapDerived(CefWrapperType type,CefFindHandler * c)60     UnwrapDerived(CefWrapperType type, CefFindHandler* c) {
61   NOTREACHED() << "Unexpected class type: " << type;
62   return nullptr;
63 }
64 
65 template <>
66 CefWrapperType CefCToCppRefCounted<CefFindHandlerCToCpp,
67                                    CefFindHandler,
68                                    cef_find_handler_t>::kWrapperType =
69     WT_FIND_HANDLER;
70