fix: update and enable osr (#15046)
* fix: update and enable osr * fix: update MacHelper view to call GetNativeView * style: move stuff around to make more sense * chore: move OSR related things in SetOwnerWindow to CommonWebContentsDelegate * fix: avoid crashing when GetOffscreenRenderWidgetHostView is called * fix: specify default for current_device_scale_factor_
This commit is contained in:
parent
d46834265f
commit
ba9a55c391
10 changed files with 176 additions and 58 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
|
||||
#include "chrome/browser/devtools/devtools_file_system_indexer.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
|
||||
#if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
|
||||
#include "atom/browser/ui/autofill_popup.h"
|
||||
|
@ -31,6 +32,10 @@ class AtomBrowserContext;
|
|||
class NativeWindow;
|
||||
class WebDialogHelper;
|
||||
|
||||
#if BUILDFLAG(ENABLE_OSR)
|
||||
class OffScreenRenderWidgetHostView;
|
||||
#endif
|
||||
|
||||
class CommonWebContentsDelegate
|
||||
: public content::WebContentsDelegate,
|
||||
public brightray::InspectableWebContentsDelegate,
|
||||
|
@ -65,6 +70,11 @@ class CommonWebContentsDelegate
|
|||
bool is_html_fullscreen() const { return html_fullscreen_; }
|
||||
|
||||
protected:
|
||||
#if BUILDFLAG(ENABLE_OSR)
|
||||
virtual OffScreenRenderWidgetHostView* GetOffScreenRenderWidgetHostView()
|
||||
const;
|
||||
#endif
|
||||
|
||||
// content::WebContentsDelegate:
|
||||
content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue