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