~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
 
3
 *
 
4
 * Redistribution and use in source and binary forms, with or without
 
5
 * modification, are permitted provided that the following conditions
 
6
 * are met:
 
7
 *
 
8
 * 1.  Redistributions of source code must retain the above copyright
 
9
 *     notice, this list of conditions and the following disclaimer.
 
10
 * 2.  Redistributions in binary form must reproduce the above copyright
 
11
 *     notice, this list of conditions and the following disclaimer in the
 
12
 *     documentation and/or other materials provided with the distribution.
 
13
 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
 
14
 *     its contributors may be used to endorse or promote products derived
 
15
 *     from this software without specific prior written permission.
 
16
 *
 
17
 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 
18
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
19
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
20
 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 
21
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
22
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
23
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 
24
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
27
 */
 
28
 
 
29
#ifndef WebFrameLoaderClient_h
 
30
#define WebFrameLoaderClient_h
 
31
 
 
32
#include <WebCore/FrameLoaderClient.h>
 
33
 
 
34
namespace WebCore {
 
35
    class PluginManualLoader;
 
36
    class PluginView;
 
37
}
 
38
 
 
39
template <typename T> class COMPtr;
 
40
class WebFrame;
 
41
class WebHistory;
 
42
 
 
43
class WebFrameLoaderClient : public WebCore::FrameLoaderClient {
 
44
public:
 
45
    virtual bool hasWebView() const;
 
46
 
 
47
    virtual void forceLayout();
 
48
 
 
49
    virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&);
 
50
 
 
51
    virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
 
52
    virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier);
 
53
    virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&);
 
54
    virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&);
 
55
    virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&);
 
56
    virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int dataLength);
 
57
    virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier);
 
58
    virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&);
 
59
    virtual bool shouldCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&, const unsigned char* data, unsigned long long length);
 
60
 
 
61
    virtual void dispatchDidHandleOnloadEvents();
 
62
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
 
63
    virtual void dispatchDidCancelClientRedirect();
 
64
    virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate);
 
65
    virtual void dispatchDidChangeLocationWithinPage();
 
66
    virtual void dispatchDidPushStateWithinPage();
 
67
    virtual void dispatchDidReplaceStateWithinPage();
 
68
    virtual void dispatchDidPopStateWithinPage();
 
69
    virtual void dispatchWillClose();
 
70
    virtual void dispatchDidReceiveIcon();
 
71
    virtual void dispatchDidStartProvisionalLoad();
 
72
    virtual void dispatchDidReceiveTitle(const WebCore::StringWithDirection&);
 
73
    virtual void dispatchDidChangeIcons(WebCore::IconType);
 
74
    virtual void dispatchDidCommitLoad();
 
75
    virtual void dispatchDidFinishDocumentLoad();
 
76
    virtual void dispatchDidFinishLoad();
 
77
    virtual void dispatchDidLayout(WebCore::LayoutMilestones);
 
78
 
 
79
    virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
 
80
    virtual void dispatchShow();
 
81
 
 
82
    virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
 
83
 
 
84
    virtual void postProgressStartedNotification();
 
85
    virtual void postProgressEstimateChangedNotification();
 
86
    virtual void postProgressFinishedNotification();
 
87
 
 
88
    virtual void committedLoad(WebCore::DocumentLoader*, const char*, int);
 
89
    virtual void finishedLoading(WebCore::DocumentLoader*);
 
90
 
 
91
    virtual void updateGlobalHistory();
 
92
    virtual void updateGlobalHistoryRedirectLinks();
 
93
    virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const;
 
94
    virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const;
 
95
    virtual void updateGlobalHistoryItemForPage();
 
96
 
 
97
    virtual void didDisplayInsecureContent();
 
98
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&);
 
99
    virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage);
 
100
 
 
101
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
 
102
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::KURL&);
 
103
 
 
104
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
 
105
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
 
106
    virtual void transitionToCommittedForNewPage();
 
107
 
 
108
    virtual void didSaveToPageCache();
 
109
    virtual void didRestoreFromPageCache();
 
110
 
 
111
    virtual void dispatchDidBecomeFrameset(bool);
 
112
 
 
113
    virtual bool canCachePage() const;
 
114
 
 
115
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
 
116
                               const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
 
117
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually);
 
118
    virtual void recreatePlugin(WebCore::Widget*) { }
 
119
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
 
120
 
 
121
    virtual bool shouldUsePluginDocument(const WTF::String& mimeType) const;
 
122
 
 
123
    virtual void dispatchDidFailToStartPlugin(const WebCore::PluginView*) const;
 
124
 
 
125
protected:
 
126
    WebFrameLoaderClient(WebFrame*);
 
127
    ~WebFrameLoaderClient();
 
128
 
 
129
private:
 
130
    PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const WTF::String& name, WebCore::HTMLFrameOwnerElement*, const WTF::String& referrer);
 
131
    WebHistory* webHistory() const;
 
132
 
 
133
    WebFrame* m_webFrame;
 
134
 
 
135
    // Points to the manual loader that data should be redirected to.
 
136
    WebCore::PluginManualLoader* m_manualLoader;
 
137
 
 
138
    bool m_hasSentResponseToPlugin;
 
139
};
 
140
 
 
141
#endif // WebFrameLoaderClient_h