fix: ensure ready-to-show event is fired (#25632)

This commit is contained in:
CezaryKulakowski 2020-09-28 22:36:45 +02:00 committed by GitHub
parent ac25f4d2ff
commit b85195ee5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 31 additions and 33 deletions

View file

@ -1240,6 +1240,12 @@ void WebContents::Invoke(bool internal,
std::move(callback), internal, channel, std::move(arguments));
}
void WebContents::OnFirstNonEmptyLayout() {
if (receivers_.current_context() == web_contents()->GetMainFrame()) {
Emit("ready-to-show");
}
}
void WebContents::ReceivePostMessage(const std::string& channel,
blink::TransferableMessage message) {
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();