cef/libcef/browser/chrome/chrome_web_contents_view_de...

38 lines
1.4 KiB
C++

// 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
#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:
content::WebContents* const web_contents_;
};
#endif // CEF_LIBCEF_BROWSER_CHROME_CHROME_WEB_CONTENTS_VIEW_DELEGATE_CEF_H_