2017-02-10 23:44:11 +01:00
|
|
|
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
|
2024-07-29 19:09:20 +02:00
|
|
|
index 446020ac6a831..6e3f6d048704c 100644
|
2017-02-10 23:44:11 +01:00
|
|
|
--- content/browser/web_contents/web_contents_view.h
|
|
|
|
+++ content/browser/web_contents/web_contents_view.h
|
2024-02-22 19:36:15 +01:00
|
|
|
@@ -26,7 +26,7 @@ struct DropData;
|
2022-05-19 12:28:44 +02:00
|
|
|
// The `WebContentsView` is an interface that is implemented by the platform-
|
|
|
|
// dependent web contents views. The `WebContents` uses this interface to talk
|
|
|
|
// to them.
|
2017-07-27 01:19:27 +02:00
|
|
|
-class WebContentsView {
|
|
|
|
+class CONTENT_EXPORT WebContentsView {
|
|
|
|
public:
|
2021-12-16 23:35:54 +01:00
|
|
|
virtual ~WebContentsView() = default;
|
2017-07-27 01:19:27 +02:00
|
|
|
|
2017-02-10 23:44:11 +01:00
|
|
|
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
2024-10-24 17:05:31 +02:00
|
|
|
index 6c8040666b520..d03d33415f033 100644
|
2017-02-10 23:44:11 +01:00
|
|
|
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
|
|
|
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -204,6 +204,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
2017-02-10 23:44:11 +01:00
|
|
|
WebContents::CreateParams params(browser_context(),
|
|
|
|
guest_site_instance.get());
|
|
|
|
params.guest_delegate = this;
|
|
|
|
+ if (delegate_)
|
|
|
|
+ delegate_->OverrideWebContentsCreateParams(¶ms);
|
2022-10-17 19:27:40 +02:00
|
|
|
std::move(callback).Run(std::move(owned_this),
|
|
|
|
WebContents::CreateWithSessionStorage(
|
|
|
|
params, owner_web_contents()
|
2017-02-10 23:44:11 +01:00
|
|
|
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
2024-05-23 03:52:35 +02:00
|
|
|
index 2fb8a60c1f56d..edd275135e60d 100644
|
2017-02-10 23:44:11 +01:00
|
|
|
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
|
|
|
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
2021-12-16 23:35:54 +01:00
|
|
|
@@ -7,6 +7,8 @@
|
|
|
|
|
2019-07-16 19:59:21 +02:00
|
|
|
#include <string>
|
2017-02-10 23:44:11 +01:00
|
|
|
|
|
|
|
+#include "content/public/browser/web_contents.h"
|
2021-12-16 23:35:54 +01:00
|
|
|
+
|
2017-02-10 23:44:11 +01:00
|
|
|
namespace content {
|
2024-05-23 03:52:35 +02:00
|
|
|
class BrowserContext;
|
2021-11-10 22:57:31 +01:00
|
|
|
class RenderFrameHost;
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -26,6 +28,10 @@ class MimeHandlerViewGuestDelegate {
|
2021-10-19 00:17:16 +02:00
|
|
|
|
2017-02-10 23:44:11 +01:00
|
|
|
virtual ~MimeHandlerViewGuestDelegate() {}
|
2017-04-27 03:59:52 +02:00
|
|
|
|
2017-02-10 23:44:11 +01:00
|
|
|
+ // Provides an opportunity to supply a custom view implementation.
|
|
|
|
+ virtual void OverrideWebContentsCreateParams(
|
|
|
|
+ content::WebContents::CreateParams* params) {}
|
2017-04-27 03:59:52 +02:00
|
|
|
+
|
2017-02-10 23:44:11 +01:00
|
|
|
// Handles context menu, or returns false if unhandled.
|
2021-11-10 22:57:31 +01:00
|
|
|
//
|
|
|
|
// The `render_frame_host` represents the frame that requests the context menu
|