Home | History | Annotate | Download | only in WebCoreSupport
      1 /*
      2  * Copyright (C) 2006 Zack Rusin <zack (at) kde.org>
      3  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
      4  * Copyright (C) 2007 Ryan Leavengood <leavengood (at) 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 
     44 ChromeClientHaiku::ChromeClientHaiku()
     45 {
     46 }
     47 
     48 ChromeClientHaiku::~ChromeClientHaiku()
     49 {
     50 }
     51 
     52 void ChromeClientHaiku::chromeDestroyed()
     53 {
     54     notImplemented();
     55 }
     56 
     57 void ChromeClientHaiku::setWindowRect(const FloatRect&)
     58 {
     59     notImplemented();
     60 }
     61 
     62 FloatRect ChromeClientHaiku::windowRect()
     63 {
     64     notImplemented();
     65     return FloatRect(0, 0, 200, 200);
     66 }
     67 
     68 FloatRect ChromeClientHaiku::pageRect()
     69 {
     70     notImplemented();
     71     return FloatRect(0, 0, 200, 200);
     72 }
     73 
     74 float ChromeClientHaiku::scaleFactor()
     75 {
     76     notImplemented();
     77     return 1.0;
     78 }
     79 
     80 void ChromeClientHaiku::focus()
     81 {
     82     notImplemented();
     83 }
     84 
     85 void ChromeClientHaiku::unfocus()
     86 {
     87     notImplemented();
     88 }
     89 
     90 bool ChromeClientHaiku::canTakeFocus(FocusDirection)
     91 {
     92     notImplemented();
     93     return true;
     94 }
     95 
     96 void ChromeClientHaiku::takeFocus(FocusDirection)
     97 {
     98     notImplemented();
     99 }
    100 
    101 void ChromeClientHaiku::focusedNodeChanged(Node*)
    102 {
    103 }
    104 
    105 Page* ChromeClientHaiku::createWindow(Frame*, const FrameLoadRequest&, const WebCore::WindowFeatures&)
    106 {
    107     notImplemented();
    108     return 0;
    109 }
    110 
    111 Page* ChromeClientHaiku::createModalDialog(Frame*, const FrameLoadRequest&)
    112 {
    113     notImplemented();
    114     return 0;
    115 }
    116 
    117 void ChromeClientHaiku::show()
    118 {
    119     notImplemented();
    120 }
    121 
    122 bool ChromeClientHaiku::canRunModal()
    123 {
    124     notImplemented();
    125     return false;
    126 }
    127 
    128 void ChromeClientHaiku::runModal()
    129 {
    130     notImplemented();
    131 }
    132 
    133 void ChromeClientHaiku::setToolbarsVisible(bool)
    134 {
    135     notImplemented();
    136 }
    137 
    138 bool ChromeClientHaiku::toolbarsVisible()
    139 {
    140     notImplemented();
    141     return false;
    142 }
    143 
    144 void ChromeClientHaiku::setStatusbarVisible(bool)
    145 {
    146     notImplemented();
    147 }
    148 
    149 bool ChromeClientHaiku::statusbarVisible()
    150 {
    151     notImplemented();
    152     return false;
    153 }
    154 
    155 void ChromeClientHaiku::setScrollbarsVisible(bool)
    156 {
    157     notImplemented();
    158 }
    159 
    160 bool ChromeClientHaiku::scrollbarsVisible()
    161 {
    162     notImplemented();
    163     return true;
    164 }
    165 
    166 void ChromeClientHaiku::setMenubarVisible(bool)
    167 {
    168     notImplemented();
    169 }
    170 
    171 bool ChromeClientHaiku::menubarVisible()
    172 {
    173     notImplemented();
    174     return false;
    175 }
    176 
    177 void ChromeClientHaiku::setResizable(bool)
    178 {
    179     notImplemented();
    180 }
    181 
    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 
    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 
    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 
    200 bool ChromeClientHaiku::canRunBeforeUnloadConfirmPanel()
    201 {
    202     notImplemented();
    203     return false;
    204 }
    205 
    206 bool ChromeClientHaiku::runBeforeUnloadConfirmPanel(const String& message, Frame* frame)
    207 {
    208     notImplemented();
    209     return false;
    210 }
    211 
    212 void ChromeClientHaiku::closeWindowSoon()
    213 {
    214     notImplemented();
    215 }
    216 
    217 void ChromeClientHaiku::runJavaScriptAlert(Frame*, const String& msg)
    218 {
    219     BAlert* alert = new BAlert("JavaScript", BString(msg).String(), "OK");
    220     alert->Go();
    221 }
    222 
    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 
    229 bool ChromeClientHaiku::runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result)
    230 {
    231     notImplemented();
    232     return false;
    233 }
    234 
    235 void ChromeClientHaiku::setStatusbarText(const String&)
    236 {
    237     notImplemented();
    238 }
    239 
    240 bool ChromeClientHaiku::shouldInterruptJavaScript()
    241 {
    242     notImplemented();
    243     return false;
    244 }
    245 
    246 bool ChromeClientHaiku::tabsToLinks() const
    247 {
    248     return false;
    249 }
    250 
    251 IntRect ChromeClientHaiku::windowResizerRect() const
    252 {
    253     return IntRect();
    254 }
    255 
    256 void ChromeClientHaiku::repaint(const IntRect&, bool contentChanged, bool immediate, bool repaintContentOnly)
    257 {
    258     notImplemented();
    259 }
    260 
    261 void ChromeClientHaiku::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
    262 {
    263     notImplemented();
    264 }
    265 
    266 IntPoint ChromeClientHaiku::screenToWindow(const IntPoint&) const
    267 {
    268     notImplemented();
    269     return IntPoint();
    270 }
    271 
    272 IntRect ChromeClientHaiku::windowToScreen(const IntRect&) const
    273 {
    274     notImplemented();
    275     return IntRect();
    276 }
    277 
    278 PlatformPageClient ChromeClientHaiku::platformPageClient() const
    279 {
    280     notImplemented();
    281     return PlatformWidget();
    282 }
    283 
    284 void ChromeClientHaiku::contentsSizeChanged(Frame*, const IntSize&) const
    285 {
    286     notImplemented();
    287 }
    288 
    289 void ChromeClientHaiku::scrollRectIntoView(const IntRect&, const ScrollView*) const
    290 {
    291     notImplemented();
    292 }
    293 
    294 void ChromeClientHaiku::addToDirtyRegion(const IntRect&)
    295 {
    296 }
    297 
    298 void ChromeClientHaiku::scrollBackingStore(int, int, const IntRect&, const IntRect&)
    299 {
    300 }
    301 
    302 void ChromeClientHaiku::updateBackingStore()
    303 {
    304 }
    305 
    306 void ChromeClientHaiku::mouseDidMoveOverElement(const HitTestResult& hit, unsigned /*modifierFlags*/)
    307 {
    308     // Some extra info
    309     notImplemented();
    310 }
    311 
    312 void ChromeClientHaiku::setToolTip(const String& tip)
    313 {
    314     notImplemented();
    315 }
    316 
    317 void ChromeClientHaiku::setToolTip(const String& tip, TextDirection)
    318 {
    319     notImplemented();
    320 }
    321 
    322 void ChromeClientHaiku::print(Frame*)
    323 {
    324     notImplemented();
    325 }
    326 
    327 void ChromeClientHaiku::exceededDatabaseQuota(Frame*, const String& databaseName)
    328 {
    329     notImplemented();
    330 }
    331 
    332 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
    333 void ChromeClientWx::reachedMaxAppCacheSize(int64_t spaceNeeded)
    334 {
    335     notImplemented();
    336 }
    337 #endif
    338 
    339 void ChromeClientHaiku::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
    340 {
    341     notImplemented();
    342 }
    343 
    344 void ChromeClientHaiku::runOpenPanel(Frame*, PassRefPtr<FileChooser>)
    345 {
    346     notImplemented();
    347 }
    348 
    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.
    357 void ChromeClientHaiku::formStateDidChange(const Node*)
    358 {
    359     notImplemented();
    360 }
    361 
    362 PassOwnPtr<HTMLParserQuirks> ChromeClientHaiku::createHTMLParserQuirks()
    363 {
    364     notImplemented();
    365     return 0;
    366 }
    367 
    368 } // namespace WebCore
    369 
    370