FrameLoaderClientAndroid.h revision d591474a98e82c78f1c85464d9c77b67cfa7d059
18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright 2007, The Android Open Source Project 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met: 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * * Redistributions of source code must retain the above copyright 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer. 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * * Redistributions in binary form must reproduce the above copyright 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * notice, this list of conditions and the following disclaimer in the 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * documentation and/or other materials provided with the distribution. 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 163298a7d84b96ade73c6b170671711a8f2792ae59Steve Block * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef FrameLoaderClientAndroid_h 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define FrameLoaderClientAndroid_h 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "CacheBuilder.h" 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "FrameLoaderClient.h" 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "ResourceResponse.h" 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "WebIconDatabase.h" 3345b64f60af3cbfa8c78388e35e9b669a0c284bdcBen Murdoch#include <wtf/Forward.h> 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 353e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scottnamespace WebCore { 363e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scottclass PluginManualLoader; 373e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scott} 383e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scott 398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectusing namespace WebCore; 408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace android { 428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class WebFrame; 438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project class FrameLoaderClientAndroid : public FrameLoaderClient, 458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project WebIconDatabaseClient { 468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project public: 478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project FrameLoaderClientAndroid(WebFrame* webframe); 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Frame* getFrame() { return m_frame; } 508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project static FrameLoaderClientAndroid* get(const Frame* frame); 518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setFrame(Frame* frame) { m_frame = frame; } 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project WebFrame* webFrame() const { return m_webFrame; } 548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void frameLoaderDestroyed(); 568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool hasWebView() const; // mainly for assertions 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void makeRepresentation(DocumentLoader*); 608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void forceLayout(); 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void forceLayoutForNonHTML(); 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void setCopiesOnScroll(); 648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void detachedFromParent2(); 668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void detachedFromParent3(); 678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&); 698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse); 71635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier); 728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&); 738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidCancelAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&); 748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&); 758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int lengthReceived); 768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier); 778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&); 788e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length); 798e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 808e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidHandleOnloadEvents(); 818e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); 828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidCancelClientRedirect(); 838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate); 848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidChangeLocationWithinPage(); 856a011ab807deb276b9924d501a4219542092958cSteve Block virtual void dispatchDidPushStateWithinPage(); 866a011ab807deb276b9924d501a4219542092958cSteve Block virtual void dispatchDidReplaceStateWithinPage(); 876a011ab807deb276b9924d501a4219542092958cSteve Block virtual void dispatchDidPopStateWithinPage(); 888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchWillClose(); 898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidReceiveIcon(); 908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidStartProvisionalLoad(); 918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidReceiveTitle(const String& title); 928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidCommitLoad(); 938e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFailProvisionalLoad(const ResourceError&); 948e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFailLoad(const ResourceError&); 958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFinishDocumentLoad(); 968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFinishLoad(); 978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidFirstLayout(); 98635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void dispatchDidFirstVisuallyNonEmptyLayout(); 998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 100f1f796b0c3a725a520ac41959a0db7855480e9deJohn Reck virtual Frame* dispatchCreatePage(const NavigationAction&); 1018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchShow(); 1028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 103d591474a98e82c78f1c85464d9c77b67cfa7d059Ben Murdoch virtual void dispatchDecidePolicyForResponse(FramePolicyFunction, const ResourceResponse&, const ResourceRequest&); 1048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName); 1058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>); 1068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void cancelPolicyCheck(); 1078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchUnableToImplementPolicy(const ResourceError&); 1098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>); 1118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void dispatchDidLoadMainResource(DocumentLoader*); 1138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void revertToProvisionalState(DocumentLoader*); 1148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void setMainDocumentError(DocumentLoader*, const ResourceError&); 1158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void willChangeEstimatedProgress(); 1178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void didChangeEstimatedProgress(); 1188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void postProgressStartedNotification(); 1198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void postProgressEstimateChangedNotification(); 1208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void postProgressFinishedNotification(); 1218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void setMainFrameDocumentReady(bool); 1238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void startDownload(const ResourceRequest&); 1258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void willChangeTitle(DocumentLoader*); 1278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void didChangeTitle(DocumentLoader*); 1288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void committedLoad(DocumentLoader*, const char*, int); 1308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void finishedLoading(DocumentLoader*); 1318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 132635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void updateGlobalHistory(); 1338f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian virtual void updateGlobalHistoryRedirectLinks(); 134635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 1358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool shouldGoToHistoryItem(HistoryItem*) const; 136d591474a98e82c78f1c85464d9c77b67cfa7d059Ben Murdoch virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const; 137b20ad8a215a2ab055647d0a026a8141b4bde7ca2Steve Block 138b20ad8a215a2ab055647d0a026a8141b4bde7ca2Steve Block virtual void didDisplayInsecureContent(); 139cbaa27bf61927b2a32fd63ff574e57035de6a968Steve Block virtual void didRunInsecureContent(SecurityOrigin*, const KURL&); 140b20ad8a215a2ab055647d0a026a8141b4bde7ca2Steve Block 141be33b78f63b17f1b6f5a36a503d797d5f9b941eeBen Murdoch virtual void dispatchDidAddBackForwardItem(HistoryItem*) const; 142be33b78f63b17f1b6f5a36a503d797d5f9b941eeBen Murdoch virtual void dispatchDidRemoveBackForwardItem(HistoryItem*) const; 143be33b78f63b17f1b6f5a36a503d797d5f9b941eeBen Murdoch virtual void dispatchDidChangeBackForwardIndex() const; 1448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError cancelledError(const ResourceRequest&); 1468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError blockedError(const ResourceRequest&); 1478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError cannotShowURLError(const ResourceRequest&); 1488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError interruptForPolicyChangeError(const ResourceRequest&); 1498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&); 1518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError fileDoesNotExistError(const ResourceResponse&); 1528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&); 1538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool shouldFallBack(const ResourceError&); 1558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool canHandleRequest(const ResourceRequest&) const; 1578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool canShowMIMEType(const String& MIMEType) const; 1588398c067254e66df9f726716f95aee2a0ca7b39aSteve Block virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const; 1598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool representationExistsForURLScheme(const String& URLScheme) const; 1608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const; 1618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void frameLoadCompleted(); 1638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void saveViewStateToItem(HistoryItem*); 1648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void restoreViewState(); 1658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void provisionalLoadStarted(); 1668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void didFinishLoad(); 1678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void prepareForDataSourceReplacement(); 1688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&); 1708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void setTitle(const String& title, const KURL&); 1718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 172b84030fc8163cde1f8f055973ef63d3e1670bf52Steve Block // This provides the userAgent to WebCore. It is used by WebCore to 173b84030fc8163cde1f8f055973ef63d3e1670bf52Steve Block // populate navigator.userAgent and to set the HTTP header in 174b84030fc8163cde1f8f055973ef63d3e1670bf52Steve Block // ResourceRequest objects. We also set a userAgent on WebRequestContext 175b84030fc8163cde1f8f055973ef63d3e1670bf52Steve Block // for the Chromium HTTP stack, which overrides the value on the 176b84030fc8163cde1f8f055973ef63d3e1670bf52Steve Block // ResourceRequest. 1778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual String userAgent(const KURL&); 178b84030fc8163cde1f8f055973ef63d3e1670bf52Steve Block 179635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*); 180635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*); 181635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project virtual void transitionToCommittedForNewPage(); 182635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 183f1f796b0c3a725a520ac41959a0db7855480e9deJohn Reck virtual void dispatchDidBecomeFrameset(bool isFrameSet); 184f1f796b0c3a725a520ac41959a0db7855480e9deJohn Reck 1858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool canCachePage() const; 1868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&); 1878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1885b71639dd156f6224bbb25ed257ac70374641f6bSteve Block virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); 1898f53f0666f20844fa87c63e5f823470c12fc2721Kristian Monsen virtual void didTransferChildFrameToNewDocument(WebCore::Page*); 190f1f796b0c3a725a520ac41959a0db7855480e9deJohn Reck virtual void transferLoadingResourceFromPage(unsigned long identifier, DocumentLoader*, const ResourceRequest&, Page* oldPage); 1915b71639dd156f6224bbb25ed257ac70374641f6bSteve Block virtual WTF::PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool loadManually); 1928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void redirectDataToPlugin(Widget* pluginWidget); 1936d289e80ffb2e1dcc0a3bdce9f2bf7fa3263745dAndrei Popescu 1946d289e80ffb2e1dcc0a3bdce9f2bf7fa3263745dAndrei Popescu virtual WTF::PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues); 1958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType); 1978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual String overrideMediaType() const; 1988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 199031c32d25a37eec52b946918d7648750f8e59a1fSteve Block virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*); 2008f72e70a9fd78eec56623b3a62e68f16b7b27e28Feng Qian virtual void documentElementAvailable(); 2018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void didPerformFirstNavigation() const; 2029e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch 2039e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch#if USE(V8) 2049e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch // TODO(benm): Implement 2059e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch virtual void didCreateScriptContextForFrame() { } 2069e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch virtual void didDestroyScriptContextForFrame() { } 2079e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch virtual void didCreateIsolatedScriptContext() { } 208a485c90712dfe99674e708d289ca14c6623a41f7Kristian Monsen 209a485c90712dfe99674e708d289ca14c6623a41f7Kristian Monsen virtual bool allowScriptExtension(const String& extensionName, int extensionGroup) { return false; } 2109e2ee40924101fa594b0b31d866f896154b47caaBen Murdoch#endif 211635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project 2128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void registerForIconNotification(bool listen = true); 2138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 214c6fbc06882c120f5f51090203775eb0421550d13Patrick Scott virtual void dispatchDidReceiveTouchIconURL(const String& url, bool precomposed); 215f1c0bbb9bf698154c206e842f94b72d277a96094Patrick Scott 2165ff0cae98f72d38d027120bffdeaa3fe3b5afd57Iain Merrick virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext(); 2175ff0cae98f72d38d027120bffdeaa3fe3b5afd57Iain Merrick 2188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // WebIconDatabaseClient api 2198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void didAddIconForPageUrl(const String& pageUrl); 2208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // FIXME: this doesn't really go here, but it's better than Frame 2228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project CacheBuilder& getCacheBuilder() { return m_cacheBuilder; } 2239dbbb4da177ba7592aaf8d18fbd85a9525bbb5f7Patrick Scott 2249dbbb4da177ba7592aaf8d18fbd85a9525bbb5f7Patrick Scott void enableOnDemandPlugins() { m_onDemandPluginsEnabled = true; } 2254c02d6a0244d7e6a7172e1f72aa514c7f68b1ceaBen Murdoch 2264c02d6a0244d7e6a7172e1f72aa514c7f68b1ceaBen Murdoch void dispatchDidChangeIcons(); 227e14e4cb809c2afcf51cce7775514d5e7820824f0Leon Scroggins void dispatchWillSendSubmitEvent(HTMLFormElement*); 2281a2c486a8175642fa5130c2d5319651286014948Steve Block 2291a2c486a8175642fa5130c2d5319651286014948Steve Block virtual void didSaveToPageCache() { } 2301a2c486a8175642fa5130c2d5319651286014948Steve Block virtual void didRestoreFromPageCache() { } 2318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project private: 2323e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scott CacheBuilder m_cacheBuilder; 2338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Frame* m_frame; 2343e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scott WebFrame* m_webFrame; 2353e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scott PluginManualLoader* m_manualLoader; 2363e4177eb7f1f222c844cea8262cd04d71d2eb547Patrick Scott bool m_hasSentResponseToPlugin; 2379dbbb4da177ba7592aaf8d18fbd85a9525bbb5f7Patrick Scott bool m_onDemandPluginsEnabled; 2388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project enum ResourceErrors { 2408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorCancelled = -99, 2418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorCannotShowUrl, 2428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorInterrupted, 2438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorCannotShowMimeType, 2448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorFileDoesNotExist, 2458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorPluginWillHandleLoadError, 2468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project InternalErrorLast 2478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 2488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project /* XXX: These must match android.net.http.EventHandler */ 2508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project enum EventHandlerErrors { 2518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Error = -1, 2528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorLookup = -2, 2538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorUnsupportedAuthScheme = -3, 2548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorAuth = -4, 2558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorProxyAuth = -5, 2568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorConnect = -6, 2578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorIO = -7, 2588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorTimeout = -8, 2598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorRedirectLoop = -9, 2608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorUnsupportedScheme = -10, 2618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorFailedSslHandshake = -11, 2628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorBadUrl = -12, 2638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorFile = -13, 2648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorFileNotFound = -14, 2658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ErrorTooManyRequests = -15 2668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 2678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project friend class CacheBuilder; 2688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project }; 2698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 2718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif 273