示例#1
0
bool ChromeClientImpl::runBeforeUnloadConfirmPanel(const String& message, LocalFrame* frame)
{
    WebFrameImpl* webframe = WebFrameImpl::fromFrame(frame);

    bool isReload = false;
    WebDataSource* ds = webframe->provisionalDataSource();
    if (ds)
        isReload = (ds->navigationType() == blink::WebNavigationTypeReload);

    if (webframe->client())
        return webframe->client()->runModalBeforeUnloadDialog(isReload, message);
    return false;
}