• 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=7671d54b3de24e8e66322daf68d66b8b8acba50c$
13 //
14 
15 #ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_
16 #define CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_
17 #pragma once
18 
19 #if !defined(WRAPPING_CEF_SHARED)
20 #error This file can be included wrapper-side only
21 #endif
22 
23 #include "include/capi/cef_browser_capi.h"
24 #include "include/capi/cef_frame_capi.h"
25 #include "include/capi/cef_urlrequest_capi.h"
26 #include "include/capi/cef_v8_capi.h"
27 #include "include/cef_browser.h"
28 #include "include/cef_frame.h"
29 #include "include/cef_urlrequest.h"
30 #include "include/cef_v8.h"
31 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
32 
33 // Wrap a C structure with a C++ class.
34 // This class may be instantiated and accessed wrapper-side only.
35 class CefFrameCToCpp
36     : public CefCToCppRefCounted<CefFrameCToCpp, CefFrame, cef_frame_t> {
37  public:
38   CefFrameCToCpp();
39   virtual ~CefFrameCToCpp();
40 
41   // CefFrame methods.
42   bool IsValid() override;
43   void Undo() override;
44   void Redo() override;
45   void Cut() override;
46   void Copy() override;
47   void Paste() override;
48   void Delete() override;
49   void SelectAll() override;
50   void ViewSource() override;
51   void GetSource(CefRefPtr<CefStringVisitor> visitor) override;
52   void GetText(CefRefPtr<CefStringVisitor> visitor) override;
53   void LoadRequest(CefRefPtr<CefRequest> request) override;
54   void LoadURL(const CefString& url) override;
55   void ExecuteJavaScript(const CefString& code,
56                          const CefString& script_url,
57                          int start_line) override;
58   bool IsMain() override;
59   bool IsFocused() override;
60   CefString GetName() override;
61   int64 GetIdentifier() override;
62   CefRefPtr<CefFrame> GetParent() override;
63   CefString GetURL() override;
64   CefRefPtr<CefBrowser> GetBrowser() override;
65   CefRefPtr<CefV8Context> GetV8Context() override;
66   void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) override;
67   CefRefPtr<CefURLRequest> CreateURLRequest(
68       CefRefPtr<CefRequest> request,
69       CefRefPtr<CefURLRequestClient> client) override;
70   void SendProcessMessage(CefProcessId target_process,
71                           CefRefPtr<CefProcessMessage> message) override;
72 };
73 
74 #endif  // CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_
75