2015-11-17 19:20:13 +01:00
|
|
|
// Copyright 2015 The Chromium Embedded Framework Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "libcef/browser/browser_platform_delegate.h"
|
|
|
|
|
2020-09-22 21:54:02 +02:00
|
|
|
#include "libcef/browser/alloy/alloy_browser_host_impl.h"
|
2015-11-17 19:20:13 +01:00
|
|
|
|
|
|
|
#include "base/logging.h"
|
2020-07-04 20:21:34 +02:00
|
|
|
|
|
|
|
CefBrowserPlatformDelegate::CefBrowserPlatformDelegate() = default;
|
2015-11-17 19:20:13 +01:00
|
|
|
|
|
|
|
CefBrowserPlatformDelegate::~CefBrowserPlatformDelegate() {
|
|
|
|
DCHECK(!browser_);
|
|
|
|
}
|
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
content::WebContents* CefBrowserPlatformDelegate::CreateWebContents(
|
|
|
|
CefBrowserCreateParams& create_params,
|
|
|
|
bool& own_web_contents) {
|
|
|
|
NOTREACHED();
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
void CefBrowserPlatformDelegate::CreateViewForWebContents(
|
|
|
|
content::WebContentsView** view,
|
|
|
|
content::RenderViewHostDelegateView** delegate_view) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::WebContentsCreated(
|
2020-07-03 22:13:27 +02:00
|
|
|
content::WebContents* web_contents,
|
|
|
|
bool owned) {
|
|
|
|
// We should not have a browser at this point.
|
|
|
|
DCHECK(!browser_);
|
|
|
|
|
|
|
|
DCHECK(!web_contents_);
|
|
|
|
web_contents_ = web_contents;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::AddNewContents(
|
|
|
|
content::WebContents* source,
|
|
|
|
std::unique_ptr<content::WebContents> new_contents,
|
|
|
|
const GURL& target_url,
|
|
|
|
WindowOpenDisposition disposition,
|
|
|
|
const gfx::Rect& initial_rect,
|
|
|
|
bool user_gesture,
|
|
|
|
bool* was_blocked) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTREACHED();
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
2020-07-04 04:51:17 +02:00
|
|
|
void CefBrowserPlatformDelegate::WebContentsDestroyed(
|
|
|
|
content::WebContents* web_contents) {
|
|
|
|
DCHECK(web_contents_ && web_contents_ == web_contents);
|
|
|
|
web_contents_ = nullptr;
|
|
|
|
}
|
|
|
|
|
2021-07-23 18:40:13 +02:00
|
|
|
bool CefBrowserPlatformDelegate::
|
|
|
|
ShouldAllowRendererInitiatedCrossProcessNavigation(
|
|
|
|
bool is_main_frame_navigation) {
|
2020-07-03 22:13:27 +02:00
|
|
|
return true;
|
|
|
|
}
|
2015-11-17 19:20:13 +01:00
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::RenderViewCreated(
|
2020-07-04 20:21:34 +02:00
|
|
|
content::RenderViewHost* render_view_host) {}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::RenderViewReady() {}
|
2015-11-17 19:20:13 +01:00
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
void CefBrowserPlatformDelegate::BrowserCreated(CefBrowserHostBase* browser) {
|
2020-07-03 22:13:27 +02:00
|
|
|
// We should have an associated WebContents at this point.
|
|
|
|
DCHECK(web_contents_);
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
DCHECK(!browser_);
|
2019-07-17 20:47:27 +02:00
|
|
|
DCHECK(browser);
|
2015-11-17 19:20:13 +01:00
|
|
|
browser_ = browser;
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::CreateExtensionHost(
|
|
|
|
const extensions::Extension* extension,
|
|
|
|
const GURL& url,
|
2021-04-21 00:52:34 +02:00
|
|
|
extensions::mojom::ViewType host_type) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
extensions::ExtensionHost* CefBrowserPlatformDelegate::GetExtensionHost()
|
|
|
|
const {
|
|
|
|
NOTREACHED();
|
|
|
|
return nullptr;
|
2015-11-17 19:20:13 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CefBrowserPlatformDelegate::NotifyBrowserCreated() {}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CefBrowserPlatformDelegate::NotifyBrowserDestroyed() {}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
void CefBrowserPlatformDelegate::BrowserDestroyed(CefBrowserHostBase* browser) {
|
2020-07-04 04:51:17 +02:00
|
|
|
// WebContentsDestroyed should already be called.
|
|
|
|
DCHECK(!web_contents_);
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
DCHECK(browser_ && browser_ == browser);
|
|
|
|
browser_ = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefBrowserPlatformDelegate::CreateHostWindow() {
|
|
|
|
NOTREACHED();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::CloseHostWindow() {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
CefWindowHandle CefBrowserPlatformDelegate::GetHostWindowHandle() const {
|
|
|
|
NOTREACHED();
|
|
|
|
return kNullWindowHandle;
|
|
|
|
}
|
|
|
|
|
2021-02-18 02:58:25 +01:00
|
|
|
#if defined(TOOLKIT_VIEWS)
|
2015-11-17 19:20:13 +01:00
|
|
|
views::Widget* CefBrowserPlatformDelegate::GetWindowWidget() const {
|
|
|
|
NOTREACHED();
|
|
|
|
return nullptr;
|
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
CefRefPtr<CefBrowserView> CefBrowserPlatformDelegate::GetBrowserView() const {
|
|
|
|
NOTREACHED();
|
|
|
|
return nullptr;
|
|
|
|
}
|
2021-02-18 02:58:25 +01:00
|
|
|
#endif // defined(TOOLKIT_VIEWS)
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::PopupWebContentsCreated(
|
|
|
|
const CefBrowserSettings& settings,
|
|
|
|
CefRefPtr<CefClient> client,
|
|
|
|
content::WebContents* new_web_contents,
|
|
|
|
CefBrowserPlatformDelegate* new_platform_delegate,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool is_devtools) {}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::PopupBrowserCreated(
|
2020-09-25 03:40:47 +02:00
|
|
|
CefBrowserHostBase* new_browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool is_devtools) {}
|
2015-11-17 19:20:13 +01:00
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
SkColor CefBrowserPlatformDelegate::GetBackgroundColor() const {
|
|
|
|
NOTREACHED();
|
|
|
|
return SkColor();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::WasResized() {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::SendKeyEvent(const CefKeyEvent& event) {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::SendMouseClickEvent(
|
|
|
|
const CefMouseEvent& event,
|
|
|
|
CefBrowserHost::MouseButtonType type,
|
|
|
|
bool mouseUp,
|
|
|
|
int clickCount) {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::SendMouseMoveEvent(const CefMouseEvent& event,
|
|
|
|
bool mouseLeave) {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::SendMouseWheelEvent(const CefMouseEvent& event,
|
|
|
|
int deltaX,
|
|
|
|
int deltaY) {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::SendTouchEvent(const CefTouchEvent& event) {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
2021-09-27 09:50:07 +02:00
|
|
|
void CefBrowserPlatformDelegate::SetFocus(bool setFocus) {
|
2020-09-25 03:40:47 +02:00
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
void CefBrowserPlatformDelegate::SendCaptureLostEvent() {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2015-11-17 19:20:13 +01:00
|
|
|
}
|
|
|
|
|
2022-01-24 18:58:02 +01:00
|
|
|
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC))
|
2020-07-04 20:21:34 +02:00
|
|
|
void CefBrowserPlatformDelegate::NotifyMoveOrResizeStarted() {}
|
2015-11-17 19:20:13 +01:00
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CefBrowserPlatformDelegate::SizeTo(int width, int height) {}
|
2015-11-17 19:20:13 +01:00
|
|
|
#endif
|
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
gfx::Point CefBrowserPlatformDelegate::GetScreenPoint(
|
|
|
|
const gfx::Point& view) const {
|
|
|
|
NOTREACHED();
|
|
|
|
return gfx::Point();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::ViewText(const std::string& text) {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefBrowserPlatformDelegate::HandleKeyboardEvent(
|
|
|
|
const content::NativeWebKeyboardEvent& event) {
|
|
|
|
NOTREACHED();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-07-03 22:13:27 +02:00
|
|
|
bool CefBrowserPlatformDelegate::PreHandleGestureEvent(
|
|
|
|
content::WebContents* source,
|
|
|
|
const blink::WebGestureEvent& event) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefBrowserPlatformDelegate::IsNeverComposited(
|
|
|
|
content::WebContents* web_contents) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
CefEventHandle CefBrowserPlatformDelegate::GetEventHandle(
|
|
|
|
const content::NativeWebKeyboardEvent& event) const {
|
|
|
|
NOTREACHED();
|
|
|
|
return kNullEventHandle;
|
|
|
|
}
|
|
|
|
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<CefFileDialogRunner>
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserPlatformDelegate::CreateFileDialogRunner() {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2015-11-17 19:20:13 +01:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<CefJavaScriptDialogRunner>
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserPlatformDelegate::CreateJavaScriptDialogRunner() {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2015-11-17 19:20:13 +01:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
std::unique_ptr<CefMenuRunner> CefBrowserPlatformDelegate::CreateMenuRunner() {
|
|
|
|
NOTIMPLEMENTED();
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefBrowserPlatformDelegate::IsWindowless() const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefBrowserPlatformDelegate::IsViewsHosted() const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
void CefBrowserPlatformDelegate::WasHidden(bool hidden) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::NotifyScreenInfoChanged() {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::Invalidate(cef_paint_element_type_t type) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2018-07-03 02:46:03 +02:00
|
|
|
void CefBrowserPlatformDelegate::SendExternalBeginFrame() {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
void CefBrowserPlatformDelegate::SetWindowlessFrameRate(int frame_rate) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CefBrowserPlatformDelegate::ImeSetComposition(
|
|
|
|
const CefString& text,
|
2016-10-28 18:11:24 +02:00
|
|
|
const std::vector<CefCompositionUnderline>& underlines,
|
|
|
|
const CefRange& replacement_range,
|
|
|
|
const CefRange& selection_range) {
|
2015-11-17 19:20:13 +01:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2016-10-28 18:11:24 +02:00
|
|
|
void CefBrowserPlatformDelegate::ImeCommitText(
|
|
|
|
const CefString& text,
|
|
|
|
const CefRange& replacement_range,
|
|
|
|
int relative_cursor_pos) {
|
2015-11-17 19:20:13 +01:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2016-10-28 18:11:24 +02:00
|
|
|
void CefBrowserPlatformDelegate::ImeFinishComposingText(bool keep_selection) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::ImeCancelComposition() {
|
2015-11-17 19:20:13 +01:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::DragTargetDragEnter(
|
|
|
|
CefRefPtr<CefDragData> drag_data,
|
|
|
|
const CefMouseEvent& event,
|
|
|
|
cef_drag_operations_mask_t allowed_ops) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::DragTargetDragOver(
|
|
|
|
const CefMouseEvent& event,
|
|
|
|
cef_drag_operations_mask_t allowed_ops) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::DragTargetDragLeave() {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::DragTargetDrop(const CefMouseEvent& event) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2016-11-23 21:54:29 +01:00
|
|
|
void CefBrowserPlatformDelegate::StartDragging(
|
|
|
|
const content::DropData& drop_data,
|
2020-10-08 21:54:42 +02:00
|
|
|
blink::DragOperationsMask allowed_ops,
|
2016-11-23 21:54:29 +01:00
|
|
|
const gfx::ImageSkia& image,
|
|
|
|
const gfx::Vector2d& image_offset,
|
2020-10-08 21:54:42 +02:00
|
|
|
const blink::mojom::DragEventSourceInfo& event_info,
|
2016-11-23 21:54:29 +01:00
|
|
|
content::RenderWidgetHostImpl* source_rwh) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::UpdateDragCursor(
|
2021-01-28 00:13:12 +01:00
|
|
|
ui::mojom::DragOperation operation) {
|
2016-11-23 21:54:29 +01:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
void CefBrowserPlatformDelegate::DragSourceEndedAt(
|
2017-05-17 11:29:28 +02:00
|
|
|
int x,
|
|
|
|
int y,
|
2015-11-17 19:20:13 +01:00
|
|
|
cef_drag_operations_mask_t op) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::DragSourceSystemDragEnded() {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2017-05-12 20:28:25 +02:00
|
|
|
void CefBrowserPlatformDelegate::AccessibilityEventReceived(
|
2018-06-08 18:53:10 +02:00
|
|
|
const content::AXEventNotificationDetails& eventData) {
|
2017-05-12 20:28:25 +02:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::AccessibilityLocationChangesReceived(
|
|
|
|
const std::vector<content::AXLocationChangeNotificationDetails>& locData) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
|
2019-07-17 20:47:27 +02:00
|
|
|
gfx::Point CefBrowserPlatformDelegate::GetDialogPosition(
|
|
|
|
const gfx::Size& size) {
|
|
|
|
NOTREACHED();
|
|
|
|
return gfx::Point();
|
|
|
|
}
|
|
|
|
|
|
|
|
gfx::Size CefBrowserPlatformDelegate::GetMaximumDialogSize() {
|
|
|
|
NOTREACHED();
|
|
|
|
return gfx::Size();
|
|
|
|
}
|
|
|
|
|
2020-07-03 22:13:27 +02:00
|
|
|
void CefBrowserPlatformDelegate::SetAutoResizeEnabled(bool enabled,
|
|
|
|
const CefSize& min_size,
|
|
|
|
const CefSize& max_size) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::SetAccessibilityState(
|
|
|
|
cef_state_t accessibility_state) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CefBrowserPlatformDelegate::IsPrintPreviewSupported() const {
|
2020-07-04 20:21:34 +02:00
|
|
|
return true;
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::Print() {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::PrintToPDF(
|
|
|
|
const CefString& path,
|
|
|
|
const CefPdfPrintSettings& settings,
|
|
|
|
CefRefPtr<CefPdfPrintCallback> callback) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::Find(int identifier,
|
|
|
|
const CefString& searchText,
|
|
|
|
bool forward,
|
|
|
|
bool matchCase,
|
|
|
|
bool findNext) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2020-07-03 22:13:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefBrowserPlatformDelegate::StopFinding(bool clearSelection) {
|
2020-07-04 20:21:34 +02:00
|
|
|
NOTIMPLEMENTED();
|
2019-07-17 20:47:27 +02:00
|
|
|
}
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
// static
|
2020-01-23 22:58:01 +01:00
|
|
|
int CefBrowserPlatformDelegate::TranslateWebEventModifiers(
|
|
|
|
uint32 cef_modifiers) {
|
|
|
|
int result = 0;
|
2015-11-17 19:20:13 +01:00
|
|
|
// Set modifiers based on key state.
|
2021-07-19 17:52:36 +02:00
|
|
|
if (cef_modifiers & EVENTFLAG_CAPS_LOCK_ON)
|
2021-07-23 18:40:13 +02:00
|
|
|
result |= blink::WebInputEvent::kCapsLockOn;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_SHIFT_DOWN)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kShiftKey;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_CONTROL_DOWN)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kControlKey;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_ALT_DOWN)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kAltKey;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kLeftButtonDown;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kMiddleButtonDown;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kRightButtonDown;
|
2021-07-19 17:52:36 +02:00
|
|
|
if (cef_modifiers & EVENTFLAG_COMMAND_DOWN)
|
2021-07-23 18:40:13 +02:00
|
|
|
result |= blink::WebInputEvent::kMetaKey;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_NUM_LOCK_ON)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kNumLockOn;
|
2021-07-19 17:52:36 +02:00
|
|
|
if (cef_modifiers & EVENTFLAG_IS_KEY_PAD)
|
|
|
|
result |= blink::WebInputEvent::kIsKeyPad;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_IS_LEFT)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kIsLeft;
|
2015-11-17 19:20:13 +01:00
|
|
|
if (cef_modifiers & EVENTFLAG_IS_RIGHT)
|
2020-01-23 22:58:01 +01:00
|
|
|
result |= blink::WebInputEvent::kIsRight;
|
2021-07-19 17:52:36 +02:00
|
|
|
if (cef_modifiers & EVENTFLAG_ALTGR_DOWN)
|
|
|
|
result |= blink::WebInputEvent::kAltGrKey;
|
|
|
|
if (cef_modifiers & EVENTFLAG_IS_REPEAT)
|
|
|
|
result |= blink::WebInputEvent::kIsAutoRepeat;
|
2020-01-23 22:58:01 +01:00
|
|
|
return result;
|
2015-11-17 19:20:13 +01:00
|
|
|
}
|