2021-12-16 23:35:54 +01:00
|
|
|
diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h
|
2024-06-14 19:01:45 +02:00
|
|
|
index ea2891a279371..595e5b8eb2cb6 100644
|
2021-12-16 23:35:54 +01:00
|
|
|
--- content/browser/browser_plugin/browser_plugin_embedder.h
|
|
|
|
+++ content/browser/browser_plugin/browser_plugin_embedder.h
|
|
|
|
@@ -15,6 +15,7 @@
|
|
|
|
#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
|
|
|
|
|
|
|
|
#include "base/memory/raw_ptr.h"
|
|
|
|
+#include "content/common/content_export.h"
|
|
|
|
|
2024-06-14 19:01:45 +02:00
|
|
|
namespace input {
|
|
|
|
struct NativeWebKeyboardEvent;
|
|
|
|
@@ -29,7 +30,7 @@ class WebContentsImpl;
|
2021-12-16 23:35:54 +01:00
|
|
|
|
|
|
|
// TODO(wjmaclean): Get rid of "BrowserPlugin" in the name of this class.
|
|
|
|
// Perhaps "WebContentsEmbedderDelegate" would be better?
|
|
|
|
-class BrowserPluginEmbedder {
|
|
|
|
+class CONTENT_EXPORT BrowserPluginEmbedder {
|
|
|
|
public:
|
|
|
|
BrowserPluginEmbedder(const BrowserPluginEmbedder&) = delete;
|
|
|
|
BrowserPluginEmbedder& operator=(const BrowserPluginEmbedder&) = delete;
|
2022-09-26 21:30:45 +02:00
|
|
|
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
2024-07-29 19:09:20 +02:00
|
|
|
index 9c2b92be1dd07..adfda85e74ea8 100644
|
2022-09-26 21:30:45 +02:00
|
|
|
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
|
|
|
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
2023-09-15 21:51:43 +02:00
|
|
|
@@ -49,6 +49,8 @@ std::unique_ptr<WebContentsImpl> BrowserPluginGuest::CreateNewGuestWindow(
|
2022-09-26 21:30:45 +02:00
|
|
|
}
|
|
|
|
|
2023-09-15 21:51:43 +02:00
|
|
|
void BrowserPluginGuest::InitInternal(WebContentsImpl* owner_web_contents) {
|
|
|
|
+ owner_web_contents_ = owner_web_contents;
|
|
|
|
+
|
|
|
|
RenderWidgetHostImpl* rwhi =
|
|
|
|
GetWebContents()->GetPrimaryMainFrame()->GetRenderWidgetHost();
|
|
|
|
DCHECK(rwhi);
|
2020-08-29 00:39:23 +02:00
|
|
|
diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h
|
2023-05-30 10:55:32 +02:00
|
|
|
index 7f3083029d45e..94a5cbed96a10 100644
|
2020-08-29 00:39:23 +02:00
|
|
|
--- content/browser/browser_plugin/browser_plugin_guest.h
|
|
|
|
+++ content/browser/browser_plugin/browser_plugin_guest.h
|
2023-02-27 19:52:38 +01:00
|
|
|
@@ -70,6 +70,8 @@ class BrowserPluginGuest : public WebContentsObserver {
|
2022-09-26 21:30:45 +02:00
|
|
|
WebContentsImpl* GetWebContents() const;
|
2023-02-27 19:52:38 +01:00
|
|
|
RenderFrameHostImpl* GetProspectiveOuterDocument();
|
2020-08-29 00:39:23 +02:00
|
|
|
|
2020-10-08 21:54:42 +02:00
|
|
|
+ WebContentsImpl* owner_web_contents() const { return owner_web_contents_; }
|
2020-08-29 00:39:23 +02:00
|
|
|
+
|
2022-09-26 21:30:45 +02:00
|
|
|
private:
|
2020-08-29 00:39:23 +02:00
|
|
|
// BrowserPluginGuest is a WebContentsObserver of |web_contents| and
|
|
|
|
// |web_contents| has to stay valid for the lifetime of BrowserPluginGuest.
|
2023-05-30 10:55:32 +02:00
|
|
|
@@ -80,6 +82,8 @@ class BrowserPluginGuest : public WebContentsObserver {
|
2022-09-26 21:30:45 +02:00
|
|
|
|
2023-05-30 10:55:32 +02:00
|
|
|
// May be null during guest destruction.
|
|
|
|
const base::WeakPtr<BrowserPluginGuestDelegate> delegate_;
|
2022-09-26 21:30:45 +02:00
|
|
|
+
|
|
|
|
+ raw_ptr<WebContentsImpl> owner_web_contents_ = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace content
|