⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frameloaderclientwx.cpp

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻 CPP
📖 第 1 页 / 共 2 页
字号:
/* * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h"#include "FrameLoaderClientWx.h"#include "DocumentLoader.h"#include "Frame.h"#include "FrameLoaderTypes.h"#include "FrameView.h"#include "FrameTree.h"#include "HTMLFormElement.h"#include "HTMLFrameOwnerElement.h"#include "NotImplemented.h"#include "Page.h"#include "PlatformString.h"#include "ProgressTracker.h"#include "RenderPart.h"#include "ResourceError.h"#include "ResourceResponse.h"#include <stdio.h>#include "WebView.h"#include "WebViewPrivate.h"namespace WebCore {inline int wxNavTypeFromWebNavType(NavigationType type){    if (type == NavigationTypeLinkClicked)        return wxWEBVIEW_NAV_LINK_CLICKED;        if (type == NavigationTypeFormSubmitted)        return wxWEBVIEW_NAV_FORM_SUBMITTED;            if (type == NavigationTypeBackForward)        return wxWEBVIEW_NAV_BACK_NEXT;            if (type == NavigationTypeReload)        return wxWEBVIEW_NAV_RELOAD;            if (type == NavigationTypeFormResubmitted)        return wxWEBVIEW_NAV_FORM_RESUBMITTED;            return wxWEBVIEW_NAV_OTHER;}FrameLoaderClientWx::FrameLoaderClientWx()    : m_frame(0){}FrameLoaderClientWx::~FrameLoaderClientWx(){}void FrameLoaderClientWx::setFrame(Frame *frame){    m_frame = frame;}void FrameLoaderClientWx::setWebView(wxWebView *webview){    m_webView = webview;}void FrameLoaderClientWx::detachFrameLoader(){    m_frame = 0;}bool FrameLoaderClientWx::hasWebView() const{    notImplemented();    return true;}bool FrameLoaderClientWx::hasBackForwardList() const{    notImplemented();    return true;}void FrameLoaderClientWx::resetBackForwardList(){    notImplemented();}bool FrameLoaderClientWx::provisionalItemIsTarget() const{    notImplemented();    return false;}void FrameLoaderClientWx::makeRepresentation(DocumentLoader*){    notImplemented();}void FrameLoaderClientWx::forceLayout(){    notImplemented();}void FrameLoaderClientWx::forceLayoutForNonHTML(){    notImplemented();}void FrameLoaderClientWx::updateHistoryForCommit(){    notImplemented();}void FrameLoaderClientWx::updateHistoryForBackForwardNavigation(){    notImplemented();}void FrameLoaderClientWx::updateHistoryForReload(){    notImplemented();}void FrameLoaderClientWx::updateHistoryForStandardLoad(){    notImplemented();}void FrameLoaderClientWx::updateHistoryForInternalLoad(){    notImplemented();}void FrameLoaderClientWx::updateHistoryAfterClientRedirect(){    notImplemented();}void FrameLoaderClientWx::setCopiesOnScroll(){    // apparently mac specific    notImplemented();}LoadErrorResetToken* FrameLoaderClientWx::tokenForLoadErrorReset(){    notImplemented();    return 0;}void FrameLoaderClientWx::resetAfterLoadError(LoadErrorResetToken*){    notImplemented();}void FrameLoaderClientWx::doNotResetAfterLoadError(LoadErrorResetToken*){    notImplemented();}void FrameLoaderClientWx::willCloseDocument(){    notImplemented();}void FrameLoaderClientWx::detachedFromParent2(){    notImplemented();}void FrameLoaderClientWx::detachedFromParent3(){    notImplemented();}void FrameLoaderClientWx::dispatchDidHandleOnloadEvents(){    if (m_webView) {        wxWebViewLoadEvent wkEvent(m_webView);        wkEvent.SetState(wxWEBVIEW_LOAD_ONLOAD_HANDLED);        wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().string());        m_webView->GetEventHandler()->ProcessEvent(wkEvent);    }}void FrameLoaderClientWx::dispatchDidReceiveServerRedirectForProvisionalLoad(){    notImplemented();}void FrameLoaderClientWx::dispatchDidCancelClientRedirect(){    notImplemented();}void FrameLoaderClientWx::dispatchWillPerformClientRedirect(const KURL&,                                                            double interval,                                                            double fireDate){    notImplemented();}void FrameLoaderClientWx::dispatchDidChangeLocationWithinPage(){    notImplemented();}void FrameLoaderClientWx::dispatchWillClose(){    notImplemented();}void FrameLoaderClientWx::dispatchDidStartProvisionalLoad(){    if (m_webView) {        wxWebViewLoadEvent wkEvent(m_webView);        wkEvent.SetState(wxWEBVIEW_LOAD_NEGOTIATING);        wkEvent.SetURL(m_frame->loader()->provisionalDocumentLoader()->request().url().string());        m_webView->GetEventHandler()->ProcessEvent(wkEvent);    }}void FrameLoaderClientWx::dispatchDidReceiveTitle(const String& title){    if (m_webView) {        m_webView->SetPageTitle(title);        wxWebViewReceivedTitleEvent wkEvent(m_webView);        wkEvent.SetTitle(title);        m_webView->GetEventHandler()->ProcessEvent(wkEvent);    }}void FrameLoaderClientWx::dispatchDidCommitLoad(){    if (m_webView) {        wxWebViewLoadEvent wkEvent(m_webView);        wkEvent.SetState(wxWEBVIEW_LOAD_TRANSFERRING);        wkEvent.SetURL(m_frame->loader()->documentLoader()->request().url().string());        m_webView->GetEventHandler()->ProcessEvent(wkEvent);    }}void FrameLoaderClientWx::dispatchDidFinishDocumentLoad(){    if (m_webView) {        wxWebViewLoadEvent wkEvent(m_webView);        wkEvent.SetState(wxWEBVIEW_LOAD_DOC_COMPLETED);        wkEvent.SetURL(m_frame->loader()->url().string());        m_webView->GetEventHandler()->ProcessEvent(wkEvent);    }}void FrameLoaderClientWx::dispatchDidFinishLoad(){    notImplemented();}void FrameLoaderClientWx::dispatchDidFirstLayout(){    notImplemented();}void FrameLoaderClientWx::dispatchDidFirstVisuallyNonEmptyLayout(){    notImplemented();}void FrameLoaderClientWx::dispatchShow(){    notImplemented();}void FrameLoaderClientWx::cancelPolicyCheck(){    notImplemented();}void FrameLoaderClientWx::dispatchWillSubmitForm(FramePolicyFunction function,                                                 PassRefPtr<FormState>){    // FIXME: Send an event to allow for alerts and cancellation    if (!m_frame)        return;    (m_frame->loader()->*function)(PolicyUse);}void FrameLoaderClientWx::dispatchDidLoadMainResource(DocumentLoader*){    notImplemented();}void FrameLoaderClientWx::revertToProvisionalState(DocumentLoader*){    notImplemented();}void FrameLoaderClientWx::postProgressStartedNotification(){    notImplemented();}void FrameLoaderClientWx::postProgressEstimateChangedNotification(){    notImplemented();}void FrameLoaderClientWx::postProgressFinishedNotification(){    if (m_webView) {        wxWebViewLoadEvent wkEvent(m_webView);        wkEvent.SetState(wxWEBVIEW_LOAD_DL_COMPLETED);        wkEvent.SetURL(m_frame->loader()->url().string());        m_webView->GetEventHandler()->ProcessEvent(wkEvent);    }}void FrameLoaderClientWx::progressStarted(){    notImplemented();}void FrameLoaderClientWx::progressCompleted(){    notImplemented();}void FrameLoaderClientWx::setMainFrameDocumentReady(bool b){    notImplemented();    // this is only interesting once we provide an external API for the DOM}void FrameLoaderClientWx::willChangeTitle(DocumentLoader*){    notImplemented();}void FrameLoaderClientWx::didChangeTitle(DocumentLoader *l){    setTitle(l->title(), l->url());}void FrameLoaderClientWx::finishedLoading(DocumentLoader*){    notImplemented();}bool FrameLoaderClientWx::canShowMIMEType(const String& MIMEType) const{    notImplemented();    return true;}bool FrameLoaderClientWx::representationExistsForURLScheme(const String& URLScheme) const{    notImplemented();    return false;}String FrameLoaderClientWx::generatedMIMETypeForURLScheme(const String& URLScheme) const{    notImplemented();    return String();}void FrameLoaderClientWx::frameLoadCompleted(){    notImplemented();}void FrameLoaderClientWx::saveViewStateToItem(HistoryItem*){    notImplemented();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -