void WebFrameLoaderClient::dispatchDidCommitLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; const ResourceResponse& response = m_frame->coreFrame()->loader()->documentLoader()->response(); RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didCommitLoadForFrame(webPage, m_frame, userData); webPage->sandboxExtensionTracker().didCommitProvisionalLoad(m_frame); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), response.mimeType(), m_frameHasCustomRepresentation, PlatformCertificateInfo(response), InjectedBundleUserMessageEncoder(userData.get()))); // Only restore the scale factor for standard frame loads (of the main frame). if (m_frame->isMainFrame() && m_frame->coreFrame()->loader()->loadType() == FrameLoadTypeStandard) { Page* page = m_frame->coreFrame()->page(); if (page && page->pageScaleFactor() != 1) webPage->scalePage(1, IntPoint()); } }
void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) { WebPage* webPage = m_frame->page(); if (!webPage) return; webPage->injectedBundleLoaderClient().didClearWindowObjectForFrame(webPage, m_frame, world); }
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double interval, double fireDate) { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().willPerformClientRedirectForFrame(webPage, m_frame, url.string(), interval, fireDate); }
void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didChangeLocationWithinPageForFrame(webPage, m_frame); }
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*) { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didRunInsecureContentForFrame(webPage, m_frame); }
void WebFrameLoaderClient::dispatchDidCancelClientRedirect() { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didCancelClientRedirectForFrame(webPage, m_frame); }
void WebFrameLoaderClient::dispatchDidHandleOnloadEvents() { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didHandleOnloadEventsForFrame(webPage, m_frame); }
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*, const KURL&) { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; webPage->injectedBundleLoaderClient().didRunInsecureContentForFrame(webPage, m_frame, userData); webPage->send(Messages::WebPageProxy::DidRunInsecureContentForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::didDetectXSS(const KURL&, bool) { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; webPage->injectedBundleLoaderClient().didDetectXSSForFrame(webPage, m_frame, userData); webPage->send(Messages::WebPageProxy::DidDetectXSSForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFinishDocumentLoadForFrame(webPage, m_frame); // Notify the UIProcess. WebProcess::shared().connection()->send(WebPageProxyMessage::DidFinishDocumentLoadForFrame, webPage->pageID(), CoreIPC::In(m_frame->frameID())); }
void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didReceiveTitleForFrame(webPage, title, m_frame); // Notify the UIProcess. WebProcess::shared().connection()->send(WebPageProxyMessage::DidReceiveTitleForFrame, webPage->pageID(), CoreIPC::In(m_frame->frameID(), title)); }
void WebFrameLoaderClient::dispatchDidPopStateWithinPage() { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didSameDocumentNavigationForFrame(webPage, m_frame, SameDocumentNavigationSessionStatePop, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidSameDocumentNavigationForFrame(m_frame->frameID(), SameDocumentNavigationSessionStatePop, m_frame->coreFrame()->document()->url().string(), InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFirstVisuallyNonEmptyLayoutForFrame(webPage, m_frame, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidFirstVisuallyNonEmptyLayoutForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::detachedFromParent2() { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didRemoveFrameFromHierarchy(webPage, m_frame, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidRemoveFrameFromHierarchy(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; DocumentLoader* provisionalLoader = m_frame->coreFrame()->loader()->provisionalDocumentLoader(); const String& url = provisionalLoader->url().string(); // Notify the bundle client. webPage->injectedBundleLoaderClient().didStartProvisionalLoadForFrame(webPage, m_frame); // Notify the UIProcess. WebProcess::shared().connection()->send(WebPageProxyMessage::DidStartProvisionalLoadForFrame, webPage->pageID(), CoreIPC::In(m_frame->frameID(), url)); }
void WebFrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title) { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. // FIXME: use direction of title. webPage->injectedBundleLoaderClient().didReceiveTitleForFrame(webPage, title.string(), m_frame, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidReceiveTitleForFrame(m_frame->frameID(), title.string(), InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::dispatchDidFinishLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFinishLoadForFrame(webPage, m_frame); // Notify the UIProcess. WebProcess::shared().connection()->send(WebPageProxyMessage::DidFinishLoadForFrame, webPage->pageID(), CoreIPC::In(m_frame->frameID())); // If we have a load listener, notify it. if (WebFrame::LoadListener* loadListener = m_frame->loadListener()) loadListener->didFinishLoad(m_frame); }
void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& error) { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFailProvisionalLoadWithErrorForFrame(webPage, m_frame); // Notify the UIProcess. WebProcess::shared().connection()->send(WebPageProxyMessage::DidFailProvisionalLoadForFrame, webPage->pageID(), CoreIPC::In(m_frame->frameID())); // If we have a load listener, notify it. if (WebFrame::LoadListener* loadListener = m_frame->loadListener()) loadListener->didFailLoad(m_frame, error.isCancellation()); }
void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; DocumentLoader* provisionalLoader = m_frame->coreFrame()->loader()->provisionalDocumentLoader(); const String& url = provisionalLoader->url().string(); RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didReceiveServerRedirectForProvisionalLoadForFrame(webPage, m_frame, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidReceiveServerRedirectForProvisionalLoadForFrame(m_frame->frameID(), url, InjectedBundleUserMessageEncoder(userData.get()))); }
void WebFrameLoaderClient::dispatchDidFirstLayout() { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFirstLayoutForFrame(webPage, m_frame, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidFirstLayoutForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get()))); if (m_frame == m_frame->page()->mainWebFrame()) webPage->drawingArea()->setLayerTreeStateIsFrozen(false); }
void WebFrameLoaderClient::dispatchDidFailLoad(const ResourceError& error) { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFailLoadWithErrorForFrame(webPage, m_frame, error, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidFailLoadForFrame(m_frame->frameID(), error, InjectedBundleUserMessageEncoder(userData.get()))); // If we have a load listener, notify it. if (WebFrame::LoadListener* loadListener = m_frame->loadListener()) loadListener->didFailLoad(m_frame, error.isCancellation()); }
void WebFrameLoaderClient::dispatchDidLayout() { WebPage* webPage = m_frame->page(); if (!webPage) return; // Notify the bundle client. webPage->injectedBundleLoaderClient().didLayoutForFrame(webPage, m_frame); // NOTE: Unlike the other layout notifications, this does not notify the // the UIProcess for every call. if (m_frame == m_frame->page()->mainWebFrame()) { // FIXME: Remove at the soonest possible time. webPage->send(Messages::WebPageProxy::SetRenderTreeSize(webPage->renderTreeSize())); webPage->mainFrameDidLayout(); } }
void WebFrameLoaderClient::dispatchDidFinishLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didFinishLoadForFrame(webPage, m_frame, userData); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidFinishLoadForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get()))); // If we have a load listener, notify it. if (WebFrame::LoadListener* loadListener = m_frame->loadListener()) loadListener->didFinishLoad(m_frame); }
void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() { WebPage* webPage = m_frame->page(); if (!webPage) return; webPage->findController().hideFindUI(); webPage->sandboxExtensionTracker().didStartProvisionalLoad(m_frame); DocumentLoader* provisionalLoader = m_frame->coreFrame()->loader()->provisionalDocumentLoader(); const String& url = provisionalLoader->url().string(); RefPtr<APIObject> userData; // Notify the bundle client. webPage->injectedBundleLoaderClient().didStartProvisionalLoadForFrame(webPage, m_frame, userData); String unreachableURL = provisionalLoader->unreachableURL().string(); // Notify the UIProcess. webPage->send(Messages::WebPageProxy::DidStartProvisionalLoadForFrame(m_frame->frameID(), url, unreachableURL, InjectedBundleUserMessageEncoder(userData.get()))); }