2015-07-16 23:40:01 +02:00
|
|
|
// Copyright 2015 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright 2014 The Chromium 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_EXTENSIONS_MIME_HANDLER_VIEW_GUEST_DELEGATE_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_EXTENSIONS_MIME_HANDLER_VIEW_GUEST_DELEGATE_H_
|
|
|
|
|
2017-05-31 17:33:30 +02:00
|
|
|
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
|
2015-07-16 23:40:01 +02:00
|
|
|
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h"
|
|
|
|
|
|
|
|
namespace content {
|
|
|
|
struct ContextMenuParams;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace extensions {
|
|
|
|
|
|
|
|
class CefMimeHandlerViewGuestDelegate : public MimeHandlerViewGuestDelegate {
|
|
|
|
public:
|
|
|
|
explicit CefMimeHandlerViewGuestDelegate(MimeHandlerViewGuest* guest);
|
2021-12-06 21:40:25 +01:00
|
|
|
|
|
|
|
CefMimeHandlerViewGuestDelegate(const CefMimeHandlerViewGuestDelegate&) =
|
|
|
|
delete;
|
|
|
|
CefMimeHandlerViewGuestDelegate& operator=(
|
|
|
|
const CefMimeHandlerViewGuestDelegate&) = delete;
|
|
|
|
|
2015-07-16 23:40:01 +02:00
|
|
|
~CefMimeHandlerViewGuestDelegate() override;
|
|
|
|
|
|
|
|
// MimeHandlerViewGuestDelegate methods.
|
|
|
|
void OverrideWebContentsCreateParams(
|
|
|
|
content::WebContents::CreateParams* params) override;
|
2020-01-23 22:58:01 +01:00
|
|
|
void OnGuestAttached() override;
|
|
|
|
void OnGuestDetached() override;
|
2021-11-10 22:57:31 +01:00
|
|
|
bool HandleContextMenu(content::RenderFrameHost& render_frame_host,
|
2015-07-16 23:40:01 +02:00
|
|
|
const content::ContextMenuParams& params) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
MimeHandlerViewGuest* guest_; // Owns us.
|
2020-01-23 22:58:01 +01:00
|
|
|
content::WebContents* owner_web_contents_;
|
2015-07-16 23:40:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace extensions
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_MIME_HANDLER_VIEW_GUEST_DELEGATE_H_
|