2022-05-27 11:03:31 +02:00
|
|
|
// Copyright 2022 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_ALLOY_ALLOY_WEB_CONTENTS_VIEW_DELEGATE_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_ALLOY_ALLOY_WEB_CONTENTS_VIEW_DELEGATE_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-05-11 17:48:38 +02:00
|
|
|
#include "base/memory/raw_ptr.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/internal/cef_ptr.h"
|
2022-05-27 11:03:31 +02:00
|
|
|
#include "content/public/browser/web_contents_view_delegate.h"
|
|
|
|
|
|
|
|
namespace content {
|
|
|
|
class WebContents;
|
|
|
|
}
|
|
|
|
|
|
|
|
class AlloyWebContentsViewDelegate : public content::WebContentsViewDelegate {
|
|
|
|
public:
|
|
|
|
explicit AlloyWebContentsViewDelegate(content::WebContents* web_contents);
|
|
|
|
|
|
|
|
AlloyWebContentsViewDelegate(const AlloyWebContentsViewDelegate&) = delete;
|
|
|
|
AlloyWebContentsViewDelegate& operator=(const AlloyWebContentsViewDelegate&) =
|
|
|
|
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_;
|
2022-05-27 11:03:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_WEB_CONTENTS_VIEW_DELEGATE_H_
|