2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2024-04-17 18:01:26 +02:00
|
|
|
// $hash=4b9914613aed142228d0cfe181a6ac65e9b6e494$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
|
|
|
#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#if !defined(WRAPPING_CEF_SHARED)
|
|
|
|
#error This file can be included wrapper-side only
|
|
|
|
#endif
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2012-10-16 21:28:07 +02:00
|
|
|
#include <vector>
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "include/capi/cef_browser_capi.h"
|
|
|
|
#include "include/capi/cef_client_capi.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "include/cef_browser.h"
|
|
|
|
#include "include/cef_client.h"
|
2017-02-09 23:07:43 +01:00
|
|
|
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Wrap a C structure with a C++ class.
|
|
|
|
// This class may be instantiated and accessed wrapper-side only.
|
2017-05-17 11:29:28 +02:00
|
|
|
class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp,
|
|
|
|
CefBrowserHost,
|
|
|
|
cef_browser_host_t> {
|
2012-04-03 03:34:16 +02:00
|
|
|
public:
|
2015-04-26 20:40:01 +02:00
|
|
|
CefBrowserHostCToCpp();
|
2019-01-23 16:42:12 +01:00
|
|
|
virtual ~CefBrowserHostCToCpp();
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CefBrowserHost methods.
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefBrowser> GetBrowser() override;
|
|
|
|
void CloseBrowser(bool force_close) override;
|
|
|
|
bool TryCloseBrowser() override;
|
|
|
|
void SetFocus(bool focus) override;
|
|
|
|
CefWindowHandle GetWindowHandle() override;
|
|
|
|
CefWindowHandle GetOpenerWindowHandle() override;
|
|
|
|
bool HasView() override;
|
|
|
|
CefRefPtr<CefClient> GetClient() override;
|
|
|
|
CefRefPtr<CefRequestContext> GetRequestContext() override;
|
2023-10-05 01:46:45 +02:00
|
|
|
bool CanZoom(cef_zoom_command_t command) override;
|
|
|
|
void Zoom(cef_zoom_command_t command) override;
|
|
|
|
double GetDefaultZoomLevel() override;
|
2021-06-17 21:43:06 +02:00
|
|
|
double GetZoomLevel() override;
|
|
|
|
void SetZoomLevel(double zoomLevel) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
void RunFileDialog(FileDialogMode mode,
|
|
|
|
const CefString& title,
|
|
|
|
const CefString& default_file_path,
|
|
|
|
const std::vector<CefString>& accept_filters,
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefRunFileDialogCallback> callback) override;
|
|
|
|
void StartDownload(const CefString& url) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
void DownloadImage(const CefString& image_url,
|
|
|
|
bool is_favicon,
|
2023-06-01 16:07:20 +02:00
|
|
|
uint32_t max_image_size,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool bypass_cache,
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefDownloadImageCallback> callback) override;
|
|
|
|
void Print() override;
|
2017-05-17 11:29:28 +02:00
|
|
|
void PrintToPDF(const CefString& path,
|
|
|
|
const CefPdfPrintSettings& settings,
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefPdfPrintCallback> callback) override;
|
2022-02-17 19:17:29 +01:00
|
|
|
void Find(const CefString& searchText,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool forward,
|
|
|
|
bool matchCase,
|
2021-06-17 21:43:06 +02:00
|
|
|
bool findNext) override;
|
|
|
|
void StopFinding(bool clearSelection) override;
|
2015-04-26 20:40:01 +02:00
|
|
|
void ShowDevTools(const CefWindowInfo& windowInfo,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefClient> client,
|
|
|
|
const CefBrowserSettings& settings,
|
2021-06-17 21:43:06 +02:00
|
|
|
const CefPoint& inspect_element_at) override;
|
|
|
|
void CloseDevTools() override;
|
|
|
|
bool HasDevTools() override;
|
|
|
|
bool SendDevToolsMessage(const void* message, size_t message_size) override;
|
2020-06-13 02:54:08 +02:00
|
|
|
int ExecuteDevToolsMethod(int message_id,
|
|
|
|
const CefString& method,
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefDictionaryValue> params) override;
|
2020-06-13 02:54:08 +02:00
|
|
|
CefRefPtr<CefRegistration> AddDevToolsMessageObserver(
|
2021-06-17 21:43:06 +02:00
|
|
|
CefRefPtr<CefDevToolsMessageObserver> observer) override;
|
2015-04-26 20:40:01 +02:00
|
|
|
void GetNavigationEntries(CefRefPtr<CefNavigationEntryVisitor> visitor,
|
2021-06-17 21:43:06 +02:00
|
|
|
bool current_only) override;
|
|
|
|
void ReplaceMisspelling(const CefString& word) override;
|
|
|
|
void AddWordToDictionary(const CefString& word) override;
|
|
|
|
bool IsWindowRenderingDisabled() override;
|
|
|
|
void WasResized() override;
|
|
|
|
void WasHidden(bool hidden) override;
|
|
|
|
void NotifyScreenInfoChanged() override;
|
|
|
|
void Invalidate(PaintElementType type) override;
|
|
|
|
void SendExternalBeginFrame() override;
|
|
|
|
void SendKeyEvent(const CefKeyEvent& event) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
void SendMouseClickEvent(const CefMouseEvent& event,
|
|
|
|
MouseButtonType type,
|
|
|
|
bool mouseUp,
|
2021-06-17 21:43:06 +02:00
|
|
|
int clickCount) override;
|
|
|
|
void SendMouseMoveEvent(const CefMouseEvent& event, bool mouseLeave) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
void SendMouseWheelEvent(const CefMouseEvent& event,
|
|
|
|
int deltaX,
|
2021-06-17 21:43:06 +02:00
|
|
|
int deltaY) override;
|
|
|
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
|
|
|
void SendCaptureLostEvent() override;
|
|
|
|
void NotifyMoveOrResizeStarted() override;
|
|
|
|
int GetWindowlessFrameRate() override;
|
|
|
|
void SetWindowlessFrameRate(int frame_rate) override;
|
2016-10-28 18:11:24 +02:00
|
|
|
void ImeSetComposition(const CefString& text,
|
2017-05-17 11:29:28 +02:00
|
|
|
const std::vector<CefCompositionUnderline>& underlines,
|
|
|
|
const CefRange& replacement_range,
|
2021-06-17 21:43:06 +02:00
|
|
|
const CefRange& selection_range) override;
|
2017-05-17 11:29:28 +02:00
|
|
|
void ImeCommitText(const CefString& text,
|
|
|
|
const CefRange& replacement_range,
|
2021-06-17 21:43:06 +02:00
|
|
|
int relative_cursor_pos) override;
|
|
|
|
void ImeFinishComposingText(bool keep_selection) override;
|
|
|
|
void ImeCancelComposition() override;
|
2015-04-26 20:40:01 +02:00
|
|
|
void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
|
2017-05-17 11:29:28 +02:00
|
|
|
const CefMouseEvent& event,
|
2021-06-17 21:43:06 +02:00
|
|
|
DragOperationsMask allowed_ops) override;
|
2015-04-26 20:40:01 +02:00
|
|
|
void DragTargetDragOver(const CefMouseEvent& event,
|
2021-06-17 21:43:06 +02:00
|
|
|
DragOperationsMask allowed_ops) override;
|
|
|
|
void DragTargetDragLeave() override;
|
|
|
|
void DragTargetDrop(const CefMouseEvent& event) override;
|
|
|
|
void DragSourceEndedAt(int x, int y, DragOperationsMask op) override;
|
|
|
|
void DragSourceSystemDragEnded() override;
|
|
|
|
CefRefPtr<CefNavigationEntry> GetVisibleNavigationEntry() override;
|
|
|
|
void SetAccessibilityState(cef_state_t accessibility_state) override;
|
2017-08-04 00:55:19 +02:00
|
|
|
void SetAutoResizeEnabled(bool enabled,
|
|
|
|
const CefSize& min_size,
|
2021-06-17 21:43:06 +02:00
|
|
|
const CefSize& max_size) override;
|
|
|
|
CefRefPtr<CefExtension> GetExtension() override;
|
|
|
|
bool IsBackgroundHost() override;
|
|
|
|
void SetAudioMuted(bool mute) override;
|
|
|
|
bool IsAudioMuted() override;
|
2023-11-07 22:40:29 +01:00
|
|
|
bool IsFullscreen() override;
|
|
|
|
void ExitFullscreen(bool will_cause_resize) override;
|
2023-11-14 18:16:43 +01:00
|
|
|
bool CanExecuteChromeCommand(int command_id) override;
|
|
|
|
void ExecuteChromeCommand(int command_id,
|
|
|
|
cef_window_open_disposition_t disposition) override;
|
2024-03-12 20:47:10 +01:00
|
|
|
bool IsRenderProcessUnresponsive() override;
|
2024-04-17 18:01:26 +02:00
|
|
|
cef_runtime_style_t GetRuntimeStyle() override;
|
2012-04-03 03:34:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|