2024-04-17 18:01:26 +02:00
|
|
|
// Copyright 2024 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.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_CHROME_CHROME_WEB_CONTENTS_VIEW_DELEGATE_CEF_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_CHROME_CHROME_WEB_CONTENTS_VIEW_DELEGATE_CEF_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-05-11 17:48:38 +02:00
|
|
|
#include "base/memory/raw_ptr.h"
|
2024-04-17 18:01:26 +02:00
|
|
|
#include "build/build_config.h"
|
|
|
|
|
|
|
|
#if BUILDFLAG(IS_MAC)
|
|
|
|
#include "chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.h"
|
|
|
|
using ChromeWebContentsViewDelegateBase = ChromeWebContentsViewDelegateViewsMac;
|
|
|
|
#else
|
|
|
|
#include "chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views.h"
|
|
|
|
using ChromeWebContentsViewDelegateBase = ChromeWebContentsViewDelegateViews;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class ChromeWebContentsViewDelegateCef
|
|
|
|
: public ChromeWebContentsViewDelegateBase {
|
|
|
|
public:
|
|
|
|
explicit ChromeWebContentsViewDelegateCef(content::WebContents* web_contents);
|
|
|
|
|
|
|
|
ChromeWebContentsViewDelegateCef(const ChromeWebContentsViewDelegateCef&) =
|
|
|
|
delete;
|
|
|
|
ChromeWebContentsViewDelegateCef& operator=(
|
|
|
|
const ChromeWebContentsViewDelegateCef&) = delete;
|
|
|
|
|
|
|
|
// WebContentsViewDelegate methods:
|
|
|
|
void ShowContextMenu(content::RenderFrameHost& render_frame_host,
|
|
|
|
const content::ContextMenuParams& params) override;
|
|
|
|
|
|
|
|
private:
|
2024-05-11 17:48:38 +02:00
|
|
|
const raw_ptr<content::WebContents> web_contents_;
|
2024-04-17 18:01:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_CHROME_CHROME_WEB_CONTENTS_VIEW_DELEGATE_CEF_H_
|