2
* Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
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.
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.
29
#ifndef FrameLoadDelegate_h
30
#define FrameLoadDelegate_h
32
#include <WebKit/WebKit.h>
33
#include <wtf/OwnPtr.h>
35
class AccessibilityController;
36
class TextInputController;
39
class FrameLoadDelegate : public IWebFrameLoadDelegate, public IWebFrameLoadDelegatePrivate2 {
42
virtual ~FrameLoadDelegate();
46
void resetToConsistentState();
48
AccessibilityController* accessibilityController() const { return m_accessibilityController.get(); }
51
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
52
virtual ULONG STDMETHODCALLTYPE AddRef(void);
53
virtual ULONG STDMETHODCALLTYPE Release(void);
55
// IWebFrameLoadDelegate
56
virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame(
57
/* [in] */ IWebView *webView,
58
/* [in] */ IWebFrame *frame);
60
virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame(
61
/* [in] */ IWebView *webView,
62
/* [in] */ IWebFrame *frame);
64
virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError(
65
/* [in] */ IWebView *webView,
66
/* [in] */ IWebError *error,
67
/* [in] */ IWebFrame *frame);
69
virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame(
70
/* [in] */ IWebView *webView,
71
/* [in] */ IWebFrame *frame);
73
virtual HRESULT STDMETHODCALLTYPE didReceiveTitle(
74
/* [in] */ IWebView *webView,
75
/* [in] */ BSTR title,
76
/* [in] */ IWebFrame *frame);
78
virtual HRESULT STDMETHODCALLTYPE didChangeIcons(
79
/* [in] */ IWebView *webView,
80
/* [in] */ IWebFrame *frame);
82
virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(
83
/* [in] */ IWebView *webView,
84
/* [in] */ OLE_HANDLE image,
85
/* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
87
virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame(
88
/* [in] */ IWebView *webView,
89
/* [in] */ IWebFrame *frame);
91
virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError(
92
/* [in] */ IWebView *webView,
93
/* [in] */ IWebError *error,
94
/* [in] */ IWebFrame *forFrame);
96
virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame(
97
/* [in] */ IWebView *webView,
98
/* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
100
virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL(
101
/* [in] */ IWebView *webView,
103
/* [in] */ double delaySeconds,
104
/* [in] */ DATE fireDate,
105
/* [in] */ IWebFrame *frame);
107
virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame(
108
/* [in] */ IWebView *webView,
109
/* [in] */ IWebFrame *frame);
111
virtual HRESULT STDMETHODCALLTYPE willCloseFrame(
112
/* [in] */ IWebView *webView,
113
/* [in] */ IWebFrame *frame);
115
virtual HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable(
116
/* [in] */ IWebView *sender,
117
/* [in] */ JSContextRef context,
118
/* [in] */ JSObjectRef windowObject) { return E_NOTIMPL; }
120
virtual /* [local] */ HRESULT STDMETHODCALLTYPE didClearWindowObject(
121
/* [in] */ IWebView* webView,
122
/* [in] */ JSContextRef context,
123
/* [in] */ JSObjectRef windowObject,
124
/* [in] */ IWebFrame* frame);
126
// IWebFrameLoadDelegatePrivate
127
virtual HRESULT STDMETHODCALLTYPE didFinishDocumentLoadForFrame(
128
/* [in] */ IWebView *sender,
129
/* [in] */ IWebFrame *frame);
131
virtual HRESULT STDMETHODCALLTYPE didFirstLayoutInFrame(
132
/* [in] */ IWebView *sender,
133
/* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
135
virtual HRESULT STDMETHODCALLTYPE didHandleOnloadEventsForFrame(
136
/* [in] */ IWebView *sender,
137
/* [in] */ IWebFrame *frame);
139
virtual HRESULT STDMETHODCALLTYPE didFirstVisuallyNonEmptyLayoutInFrame(
140
/* [in] */ IWebView *sender,
141
/* [in] */ IWebFrame *frame);
143
// IWebFrameLoadDelegatePrivate2
144
virtual HRESULT STDMETHODCALLTYPE didDisplayInsecureContent(
145
/* [in] */ IWebView *sender);
147
virtual HRESULT STDMETHODCALLTYPE didRunInsecureContent(
148
/* [in] */ IWebView *sender,
149
/* [in] */ IWebSecurityOrigin *origin);
151
virtual HRESULT STDMETHODCALLTYPE didClearWindowObjectForFrameInScriptWorld(IWebView*, IWebFrame*, IWebScriptWorld*);
153
virtual HRESULT STDMETHODCALLTYPE didPushStateWithinPageForFrame(
154
/* [in] */ IWebView *sender,
155
/* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
157
virtual HRESULT STDMETHODCALLTYPE didReplaceStateWithinPageForFrame(
158
/* [in] */ IWebView *sender,
159
/* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
161
virtual HRESULT STDMETHODCALLTYPE didPopStateWithinPageForFrame(
162
/* [in] */ IWebView *sender,
163
/* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
166
void didClearWindowObjectForFrameInIsolatedWorld(IWebFrame*, IWebScriptWorld*);
167
void didClearWindowObjectForFrameInStandardWorld(IWebFrame*);
169
void locationChangeDone(IWebError*, IWebFrame*);
172
OwnPtr<GCController> m_gcController;
173
OwnPtr<AccessibilityController> m_accessibilityController;
174
OwnPtr<TextInputController> m_textInputController;
177
#endif // FrameLoadDelegate_h