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=c7912e34194393590c80fdf47269afbc08a2a9be$ 13 // 14 15 #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ 16 #define CEF_LIBCEF_DLL_CTOCPP_BROWSER_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 <vector> 24 #include "include/capi/cef_browser_capi.h" 25 #include "include/capi/cef_client_capi.h" 26 #include "include/cef_browser.h" 27 #include "include/cef_client.h" 28 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 29 30 // Wrap a C structure with a C++ class. 31 // This class may be instantiated and accessed wrapper-side only. 32 class CefBrowserCToCpp 33 : public CefCToCppRefCounted<CefBrowserCToCpp, CefBrowser, cef_browser_t> { 34 public: 35 CefBrowserCToCpp(); 36 virtual ~CefBrowserCToCpp(); 37 38 // CefBrowser methods. 39 bool IsValid() override; 40 CefRefPtr<CefBrowserHost> GetHost() override; 41 bool CanGoBack() override; 42 void GoBack() override; 43 bool CanGoForward() override; 44 void GoForward() override; 45 bool IsLoading() override; 46 void Reload() override; 47 void ReloadIgnoreCache() override; 48 void StopLoad() override; 49 int GetIdentifier() override; 50 bool IsSame(CefRefPtr<CefBrowser> that) override; 51 bool IsPopup() override; 52 bool HasDocument() override; 53 CefRefPtr<CefFrame> GetMainFrame() override; 54 CefRefPtr<CefFrame> GetFocusedFrame() override; 55 CefRefPtr<CefFrame> GetFrame(int64 identifier) override; 56 CefRefPtr<CefFrame> GetFrame(const CefString& name) override; 57 size_t GetFrameCount() override; 58 void GetFrameIdentifiers(std::vector<int64>& identifiers) override; 59 void GetFrameNames(std::vector<CefString>& names) override; 60 }; 61 62 #endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ 63