• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2006 Zack Rusin <zack@kde.org>
3  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
4  * Copyright (C) 2007 Ryan Leavengood <leavengood@gmail.com> All rights reserved.
5  *
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
20  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 #include "config.h"
29 #include "ChromeClientHaiku.h"
30 
31 #include "Frame.h"
32 #include "FrameLoadRequest.h"
33 #include "FrameView.h"
34 #include "HitTestResult.h"
35 #include "NotImplemented.h"
36 #include "PlatformString.h"
37 
38 #include <Alert.h>
39 #include <String.h>
40 
41 
42 namespace WebCore {
43 
ChromeClientHaiku()44 ChromeClientHaiku::ChromeClientHaiku()
45 {
46 }
47 
~ChromeClientHaiku()48 ChromeClientHaiku::~ChromeClientHaiku()
49 {
50 }
51 
chromeDestroyed()52 void ChromeClientHaiku::chromeDestroyed()
53 {
54     notImplemented();
55 }
56 
setWindowRect(const FloatRect &)57 void ChromeClientHaiku::setWindowRect(const FloatRect&)
58 {
59     notImplemented();
60 }
61 
windowRect()62 FloatRect ChromeClientHaiku::windowRect()
63 {
64     notImplemented();
65     return FloatRect(0, 0, 200, 200);
66 }
67 
pageRect()68 FloatRect ChromeClientHaiku::pageRect()
69 {
70     notImplemented();
71     return FloatRect(0, 0, 200, 200);
72 }
73 
scaleFactor()74 float ChromeClientHaiku::scaleFactor()
75 {
76     notImplemented();
77     return 1.0;
78 }
79 
focus()80 void ChromeClientHaiku::focus()
81 {
82     notImplemented();
83 }
84 
unfocus()85 void ChromeClientHaiku::unfocus()
86 {
87     notImplemented();
88 }
89 
canTakeFocus(FocusDirection)90 bool ChromeClientHaiku::canTakeFocus(FocusDirection)
91 {
92     notImplemented();
93     return true;
94 }
95 
takeFocus(FocusDirection)96 void ChromeClientHaiku::takeFocus(FocusDirection)
97 {
98     notImplemented();
99 }
100 
focusedNodeChanged(Node *)101 void ChromeClientHaiku::focusedNodeChanged(Node*)
102 {
103 }
104 
createWindow(Frame *,const FrameLoadRequest &,const WebCore::WindowFeatures &)105 Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&)
106 {
107     notImplemented();
108     return 0;
109 }
110 
createModalDialog(Frame *,const FrameLoadRequest &)111 Page* ChromeClientHaiku::createModalDialog(Frame*, const FrameLoadRequest&)
112 {
113     notImplemented();
114     return 0;
115 }
116 
show()117 void ChromeClientHaiku::show()
118 {
119     notImplemented();
120 }
121 
canRunModal()122 bool ChromeClientHaiku::canRunModal()
123 {
124     notImplemented();
125     return false;
126 }
127 
runModal()128 void ChromeClientHaiku::runModal()
129 {
130     notImplemented();
131 }
132 
setToolbarsVisible(bool)133 void ChromeClientHaiku::setToolbarsVisible(bool)
134 {
135     notImplemented();
136 }
137 
toolbarsVisible()138 bool ChromeClientHaiku::toolbarsVisible()
139 {
140     notImplemented();
141     return false;
142 }
143 
setStatusbarVisible(bool)144 void ChromeClientHaiku::setStatusbarVisible(bool)
145 {
146     notImplemented();
147 }
148 
statusbarVisible()149 bool ChromeClientHaiku::statusbarVisible()
150 {
151     notImplemented();
152     return false;
153 }
154 
setScrollbarsVisible(bool)155 void ChromeClientHaiku::setScrollbarsVisible(bool)
156 {
157     notImplemented();
158 }
159 
scrollbarsVisible()160 bool ChromeClientHaiku::scrollbarsVisible()
161 {
162     notImplemented();
163     return true;
164 }
165 
setMenubarVisible(bool)166 void ChromeClientHaiku::setMenubarVisible(bool)
167 {
168     notImplemented();
169 }
170 
menubarVisible()171 bool ChromeClientHaiku::menubarVisible()
172 {
173     notImplemented();
174     return false;
175 }
176 
setResizable(bool)177 void ChromeClientHaiku::setResizable(bool)
178 {
179     notImplemented();
180 }
181 
addMessageToConsole(const String & message,unsigned int lineNumber,const String & sourceID)182 void ChromeClientHaiku::addMessageToConsole(const String& message, unsigned int lineNumber,
183                                             const String& sourceID)
184 {
185     printf("MESSAGE %s:%i %s\n", BString(sourceID).String(), lineNumber, BString(message).String());
186 }
187 
addMessageToConsole(MessageSource,MessageLevel,const String & message,unsigned int lineNumber,const String & sourceID)188 void ChromeClientHaiku::addMessageToConsole(MessageSource, MessageLevel, const String& message,
189                                             unsigned int lineNumber, const String& sourceID)
190 {
191     printf("MESSAGE %s:%i %s\n", BString(sourceID).String(), lineNumber, BString(message).String());
192 }
193 
addMessageToConsole(MessageSource,MessageType,MessageLevel,const String & message,unsigned int lineNumber,const String & sourceID)194 void ChromeClientHaiku::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message,
195                                             unsigned int lineNumber, const String& sourceID)
196 {
197     printf("MESSAGE %s:%i %s\n", BString(sourceID).String(), lineNumber, BString(message).String());
198 }
199 
canRunBeforeUnloadConfirmPanel()200 bool ChromeClientHaiku::canRunBeforeUnloadConfirmPanel()
201 {
202     notImplemented();
203     return false;
204 }
205 
runBeforeUnloadConfirmPanel(const String & message,Frame * frame)206 bool ChromeClientHaiku::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
207 {
208     notImplemented();
209     return false;
210 }
211 
closeWindowSoon()212 void ChromeClientHaiku::closeWindowSoon()
213 {
214     notImplemented();
215 }
216 
runJavaScriptAlert(Frame *,const String & msg)217 void ChromeClientHaiku::runJavaScriptAlert(Frame*, const String& msg)
218 {
219     BAlert* alert = new BAlert("JavaScript", BString(msg).String(), "OK");
220     alert->Go();
221 }
222 
runJavaScriptConfirm(Frame *,const String & msg)223 bool ChromeClientHaiku::runJavaScriptConfirm(Frame*, const String& msg)
224 {
225     BAlert* alert = new BAlert("JavaScript", BString(msg).String(), "Yes", "No");
226     return !alert->Go();
227 }
228 
runJavaScriptPrompt(Frame *,const String & message,const String & defaultValue,String & result)229 bool ChromeClientHaiku::runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result)
230 {
231     notImplemented();
232     return false;
233 }
234 
setStatusbarText(const String &)235 void ChromeClientHaiku::setStatusbarText(const String&)
236 {
237     notImplemented();
238 }
239 
shouldInterruptJavaScript()240 bool ChromeClientHaiku::shouldInterruptJavaScript()
241 {
242     notImplemented();
243     return false;
244 }
245 
tabsToLinks() const246 bool ChromeClientHaiku::tabsToLinks() const
247 {
248     return false;
249 }
250 
windowResizerRect() const251 IntRect ChromeClientHaiku::windowResizerRect() const
252 {
253     return IntRect();
254 }
255 
repaint(const IntRect &,bool contentChanged,bool immediate,bool repaintContentOnly)256 void ChromeClientHaiku::repaint(const IntRect&, bool contentChanged, bool immediate, bool repaintContentOnly)
257 {
258     notImplemented();
259 }
260 
scroll(const IntSize & scrollDelta,const IntRect & rectToScroll,const IntRect & clipRect)261 void ChromeClientHaiku::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
262 {
263     notImplemented();
264 }
265 
screenToWindow(const IntPoint &) const266 IntPoint ChromeClientHaiku::screenToWindow(const IntPoint&) const
267 {
268     notImplemented();
269     return IntPoint();
270 }
271 
windowToScreen(const IntRect &) const272 IntRect ChromeClientHaiku::windowToScreen(const IntRect&) const
273 {
274     notImplemented();
275     return IntRect();
276 }
277 
platformPageClient() const278 PlatformPageClient ChromeClientHaiku::platformPageClient() const
279 {
280     notImplemented();
281     return PlatformWidget();
282 }
283 
contentsSizeChanged(Frame *,const IntSize &) const284 void ChromeClientHaiku::contentsSizeChanged(Frame*, const IntSize&) const
285 {
286     notImplemented();
287 }
288 
scrollRectIntoView(const IntRect &,const ScrollView *) const289 void ChromeClientHaiku::scrollRectIntoView(const IntRect&, const ScrollView*) const
290 {
291     notImplemented();
292 }
293 
addToDirtyRegion(const IntRect &)294 void ChromeClientHaiku::addToDirtyRegion(const IntRect&)
295 {
296 }
297 
scrollBackingStore(int,int,const IntRect &,const IntRect &)298 void ChromeClientHaiku::scrollBackingStore(int, int, const IntRect&, const IntRect&)
299 {
300 }
301 
updateBackingStore()302 void ChromeClientHaiku::updateBackingStore()
303 {
304 }
305 
mouseDidMoveOverElement(const HitTestResult & hit,unsigned)306 void ChromeClientHaiku::mouseDidMoveOverElement(const HitTestResult& hit, unsigned /*modifierFlags*/)
307 {
308     // Some extra info
309     notImplemented();
310 }
311 
setToolTip(const String & tip)312 void ChromeClientHaiku::setToolTip(const String& tip)
313 {
314     notImplemented();
315 }
316 
setToolTip(const String & tip,TextDirection)317 void ChromeClientHaiku::setToolTip(const String& tip, TextDirection)
318 {
319     notImplemented();
320 }
321 
print(Frame *)322 void ChromeClientHaiku::print(Frame*)
323 {
324     notImplemented();
325 }
326 
exceededDatabaseQuota(Frame *,const String & databaseName)327 void ChromeClientHaiku::exceededDatabaseQuota(Frame*, const String& databaseName)
328 {
329     notImplemented();
330 }
331 
332 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
reachedMaxAppCacheSize(int64_t spaceNeeded)333 void ChromeClientWx::reachedMaxAppCacheSize(int64_t spaceNeeded)
334 {
335     notImplemented();
336 }
337 #endif
338 
requestGeolocationPermissionForFrame(Frame *,Geolocation *)339 void ChromeClientHaiku::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
340 {
341     notImplemented();
342 }
343 
runOpenPanel(Frame *,PassRefPtr<FileChooser>)344 void ChromeClientHaiku::runOpenPanel(Frame*, PassRefPtr<FileChooser>)
345 {
346     notImplemented();
347 }
348 
setCursor(PlatformCursorHandle)349 bool ChromeClientHaiku::setCursor(PlatformCursorHandle)
350 {
351     notImplemented();
352     return false;
353 }
354 
355 // Notification that the given form element has changed. This function
356 // will be called frequently, so handling should be very fast.
formStateDidChange(const Node *)357 void ChromeClientHaiku::formStateDidChange(const Node*)
358 {
359     notImplemented();
360 }
361 
createHTMLParserQuirks()362 PassOwnPtr<HTMLParserQuirks> ChromeClientHaiku::createHTMLParserQuirks()
363 {
364     notImplemented();
365     return 0;
366 }
367 
368 } // namespace WebCore
369 
370