mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: ensure ready-to-show event is fired (#25932)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
This commit is contained in:
@@ -128,6 +128,16 @@ void ElectronRenderFrameObserver::OnDestruct() {
|
||||
delete this;
|
||||
}
|
||||
|
||||
void ElectronRenderFrameObserver::DidMeaningfulLayout(
|
||||
blink::WebMeaningfulLayout layout_type) {
|
||||
if (layout_type == blink::WebMeaningfulLayout::kVisuallyNonEmpty) {
|
||||
mojo::Remote<mojom::ElectronBrowser> browser_remote;
|
||||
render_frame_->GetRemoteInterfaces()->GetInterface(
|
||||
browser_remote.BindNewPipeAndPassReceiver());
|
||||
browser_remote->OnFirstNonEmptyLayout();
|
||||
}
|
||||
}
|
||||
|
||||
void ElectronRenderFrameObserver::CreateIsolatedWorldContext() {
|
||||
auto* frame = render_frame_->GetWebFrame();
|
||||
blink::WebIsolatedWorldInfo info;
|
||||
|
||||
@@ -33,6 +33,7 @@ class ElectronRenderFrameObserver : public content::RenderFrameObserver {
|
||||
void WillReleaseScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
void OnDestruct() override;
|
||||
void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override;
|
||||
|
||||
private:
|
||||
bool ShouldNotifyClient(int world_id);
|
||||
|
||||
Reference in New Issue
Block a user