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

« back to all changes in this revision

Viewing changes to Tools/DumpRenderTree/win/FrameLoadDelegate.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) 2005, 2006, 2007 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 FrameLoadDelegate_h
 
30
#define FrameLoadDelegate_h
 
31
 
 
32
#include <WebKit/WebKit.h>
 
33
#include <wtf/OwnPtr.h>
 
34
 
 
35
class AccessibilityController;
 
36
class TextInputController;
 
37
class GCController;
 
38
 
 
39
class FrameLoadDelegate : public IWebFrameLoadDelegate, public IWebFrameLoadDelegatePrivate2 {
 
40
public:
 
41
    FrameLoadDelegate();
 
42
    virtual ~FrameLoadDelegate();
 
43
 
 
44
    void processWork();
 
45
 
 
46
    void resetToConsistentState();
 
47
 
 
48
    AccessibilityController* accessibilityController() const { return m_accessibilityController.get(); }
 
49
 
 
50
    // IUnknown
 
51
    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
 
52
    virtual ULONG STDMETHODCALLTYPE AddRef(void);
 
53
    virtual ULONG STDMETHODCALLTYPE Release(void);
 
54
 
 
55
    // IWebFrameLoadDelegate
 
56
    virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame( 
 
57
        /* [in] */ IWebView *webView,
 
58
        /* [in] */ IWebFrame *frame); 
 
59
 
 
60
    virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame( 
 
61
        /* [in] */ IWebView *webView,
 
62
        /* [in] */ IWebFrame *frame);
 
63
 
 
64
    virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError( 
 
65
        /* [in] */ IWebView *webView,
 
66
        /* [in] */ IWebError *error,
 
67
        /* [in] */ IWebFrame *frame);
 
68
 
 
69
    virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame( 
 
70
        /* [in] */ IWebView *webView,
 
71
        /* [in] */ IWebFrame *frame);
 
72
 
 
73
    virtual HRESULT STDMETHODCALLTYPE didReceiveTitle( 
 
74
        /* [in] */ IWebView *webView,
 
75
        /* [in] */ BSTR title,
 
76
        /* [in] */ IWebFrame *frame);
 
77
 
 
78
    virtual HRESULT STDMETHODCALLTYPE didChangeIcons(
 
79
        /* [in] */ IWebView *webView,
 
80
        /* [in] */ IWebFrame *frame);
 
81
 
 
82
    virtual HRESULT STDMETHODCALLTYPE didReceiveIcon( 
 
83
        /* [in] */ IWebView *webView,
 
84
        /* [in] */ OLE_HANDLE image,
 
85
        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
 
86
 
 
87
    virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame( 
 
88
        /* [in] */ IWebView *webView,
 
89
        /* [in] */ IWebFrame *frame);
 
90
 
 
91
    virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError( 
 
92
        /* [in] */ IWebView *webView,
 
93
        /* [in] */ IWebError *error,
 
94
        /* [in] */ IWebFrame *forFrame);
 
95
 
 
96
    virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame( 
 
97
        /* [in] */ IWebView *webView,
 
98
        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
 
99
 
 
100
    virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL( 
 
101
        /* [in] */ IWebView *webView,
 
102
        /* [in] */ BSTR url,
 
103
        /* [in] */ double delaySeconds,
 
104
        /* [in] */ DATE fireDate,
 
105
        /* [in] */ IWebFrame *frame);
 
106
 
 
107
    virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame( 
 
108
        /* [in] */ IWebView *webView,
 
109
        /* [in] */ IWebFrame *frame);
 
110
 
 
111
    virtual HRESULT STDMETHODCALLTYPE willCloseFrame( 
 
112
        /* [in] */ IWebView *webView,
 
113
        /* [in] */ IWebFrame *frame);
 
114
 
 
115
    virtual HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable( 
 
116
        /* [in] */ IWebView *sender,
 
117
        /* [in] */ JSContextRef context,
 
118
        /* [in] */ JSObjectRef windowObject) { return E_NOTIMPL; }
 
119
 
 
120
    virtual /* [local] */ HRESULT STDMETHODCALLTYPE didClearWindowObject( 
 
121
        /* [in] */ IWebView* webView,
 
122
        /* [in] */ JSContextRef context,
 
123
        /* [in] */ JSObjectRef windowObject,
 
124
        /* [in] */ IWebFrame* frame);
 
125
 
 
126
    // IWebFrameLoadDelegatePrivate
 
127
    virtual HRESULT STDMETHODCALLTYPE didFinishDocumentLoadForFrame( 
 
128
        /* [in] */ IWebView *sender,
 
129
        /* [in] */ IWebFrame *frame);
 
130
        
 
131
    virtual HRESULT STDMETHODCALLTYPE didFirstLayoutInFrame( 
 
132
        /* [in] */ IWebView *sender,
 
133
        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
 
134
        
 
135
    virtual HRESULT STDMETHODCALLTYPE didHandleOnloadEventsForFrame( 
 
136
        /* [in] */ IWebView *sender,
 
137
        /* [in] */ IWebFrame *frame);
 
138
 
 
139
    virtual HRESULT STDMETHODCALLTYPE didFirstVisuallyNonEmptyLayoutInFrame( 
 
140
        /* [in] */ IWebView *sender,
 
141
        /* [in] */ IWebFrame *frame);
 
142
 
 
143
    // IWebFrameLoadDelegatePrivate2
 
144
    virtual HRESULT STDMETHODCALLTYPE didDisplayInsecureContent( 
 
145
        /* [in] */ IWebView *sender);
 
146
 
 
147
    virtual HRESULT STDMETHODCALLTYPE didRunInsecureContent( 
 
148
        /* [in] */ IWebView *sender,
 
149
        /* [in] */ IWebSecurityOrigin *origin);
 
150
 
 
151
    virtual HRESULT STDMETHODCALLTYPE didClearWindowObjectForFrameInScriptWorld(IWebView*, IWebFrame*, IWebScriptWorld*);
 
152
 
 
153
    virtual HRESULT STDMETHODCALLTYPE didPushStateWithinPageForFrame( 
 
154
        /* [in] */ IWebView *sender,
 
155
        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
 
156
    
 
157
    virtual HRESULT STDMETHODCALLTYPE didReplaceStateWithinPageForFrame( 
 
158
        /* [in] */ IWebView *sender,
 
159
        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
 
160
 
 
161
    virtual HRESULT STDMETHODCALLTYPE didPopStateWithinPageForFrame( 
 
162
        /* [in] */ IWebView *sender,
 
163
        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
 
164
 
 
165
private:
 
166
    void didClearWindowObjectForFrameInIsolatedWorld(IWebFrame*, IWebScriptWorld*);
 
167
    void didClearWindowObjectForFrameInStandardWorld(IWebFrame*);
 
168
 
 
169
    void locationChangeDone(IWebError*, IWebFrame*);
 
170
 
 
171
    ULONG m_refCount;
 
172
    OwnPtr<GCController> m_gcController;
 
173
    OwnPtr<AccessibilityController> m_accessibilityController;
 
174
    OwnPtr<TextInputController> m_textInputController;
 
175
};
 
176
 
 
177
#endif // FrameLoadDelegate_h