Home | History | Annotate | Download | only in CPP
      1 /*
      2  * This file is part of the WebKit open source project.
      3  * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
      4  *
      5  * This library is free software; you can redistribute it and/or
      6  * modify it under the terms of the GNU Library General Public
      7  * License as published by the Free Software Foundation; either
      8  * version 2 of the License, or (at your option) any later version.
      9  *
     10  * This library is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13  * Library General Public License for more details.
     14  *
     15  * You should have received a copy of the GNU Library General Public License
     16  * along with this library; see the file COPYING.LIB.  If not, write to
     17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     18  * Boston, MA 02110-1301, USA.
     19  */
     20 
     21 #include "config.h"
     22 #include "WebDOMTestObj.h"
     23 
     24 #include "HTMLNames.h"
     25 #include "IDBKey.h"
     26 #include "KURL.h"
     27 #include "OptionsObject.h"
     28 #include "SerializedScriptValue.h"
     29 #include "TestObj.h"
     30 #include "WebDOMIDBKey.h"
     31 #include "WebDOMOptionsObject.h"
     32 #include "WebDOMString.h"
     33 #include "WebExceptionHandler.h"
     34 #include "WebNativeEventListener.h"
     35 #include "wtf/text/AtomicString.h"
     36 #include <wtf/GetPtr.h>
     37 #include <wtf/RefPtr.h>
     38 
     39 struct WebDOMTestObj::WebDOMTestObjPrivate {
     40     WebDOMTestObjPrivate(WebCore::TestObj* object = 0)
     41         : impl(object)
     42     {
     43     }
     44 
     45     RefPtr<WebCore::TestObj> impl;
     46 };
     47 
     48 WebDOMTestObj::WebDOMTestObj()
     49     : WebDOMObject()
     50     , m_impl(0)
     51 {
     52 }
     53 
     54 WebDOMTestObj::WebDOMTestObj(WebCore::TestObj* impl)
     55     : WebDOMObject()
     56     , m_impl(new WebDOMTestObjPrivate(impl))
     57 {
     58 }
     59 
     60 WebDOMTestObj::WebDOMTestObj(const WebDOMTestObj& copy)
     61     : WebDOMObject()
     62 {
     63     m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0;
     64 }
     65 
     66 WebDOMTestObj& WebDOMTestObj::operator=(const WebDOMTestObj& copy)
     67 {
     68     delete m_impl;
     69     m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0;
     70     return *this;
     71 }
     72 
     73 WebCore::TestObj* WebDOMTestObj::impl() const
     74 {
     75     return m_impl ? m_impl->impl.get() : 0;
     76 }
     77 
     78 WebDOMTestObj::~WebDOMTestObj()
     79 {
     80     delete m_impl;
     81     m_impl = 0;
     82 }
     83 
     84 int WebDOMTestObj::readOnlyIntAttr() const
     85 {
     86     if (!impl())
     87         return 0;
     88 
     89     return impl()->readOnlyIntAttr();
     90 }
     91 
     92 WebDOMString WebDOMTestObj::readOnlyStringAttr() const
     93 {
     94     if (!impl())
     95         return WebDOMString();
     96 
     97     return static_cast<const WTF::String&>(impl()->readOnlyStringAttr());
     98 }
     99 
    100 WebDOMTestObj WebDOMTestObj::readOnlyTestObjAttr() const
    101 {
    102     if (!impl())
    103         return WebDOMTestObj();
    104 
    105     return toWebKit(WTF::getPtr(impl()->readOnlyTestObjAttr()));
    106 }
    107 
    108 short WebDOMTestObj::shortAttr() const
    109 {
    110     if (!impl())
    111         return 0;
    112 
    113     return impl()->shortAttr();
    114 }
    115 
    116 void WebDOMTestObj::setShortAttr(short newShortAttr)
    117 {
    118     if (!impl())
    119         return;
    120 
    121     impl()->setShortAttr(newShortAttr);
    122 }
    123 
    124 unsigned short WebDOMTestObj::unsignedShortAttr() const
    125 {
    126     if (!impl())
    127         return 0;
    128 
    129     return impl()->unsignedShortAttr();
    130 }
    131 
    132 void WebDOMTestObj::setUnsignedShortAttr(unsigned short newUnsignedShortAttr)
    133 {
    134     if (!impl())
    135         return;
    136 
    137     impl()->setUnsignedShortAttr(newUnsignedShortAttr);
    138 }
    139 
    140 int WebDOMTestObj::intAttr() const
    141 {
    142     if (!impl())
    143         return 0;
    144 
    145     return impl()->intAttr();
    146 }
    147 
    148 void WebDOMTestObj::setIntAttr(int newIntAttr)
    149 {
    150     if (!impl())
    151         return;
    152 
    153     impl()->setIntAttr(newIntAttr);
    154 }
    155 
    156 long long WebDOMTestObj::longLongAttr() const
    157 {
    158     if (!impl())
    159         return 0;
    160 
    161     return impl()->longLongAttr();
    162 }
    163 
    164 void WebDOMTestObj::setLongLongAttr(long long newLongLongAttr)
    165 {
    166     if (!impl())
    167         return;
    168 
    169     impl()->setLongLongAttr(newLongLongAttr);
    170 }
    171 
    172 unsigned long long WebDOMTestObj::unsignedLongLongAttr() const
    173 {
    174     if (!impl())
    175         return 0;
    176 
    177     return impl()->unsignedLongLongAttr();
    178 }
    179 
    180 void WebDOMTestObj::setUnsignedLongLongAttr(unsigned long long newUnsignedLongLongAttr)
    181 {
    182     if (!impl())
    183         return;
    184 
    185     impl()->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
    186 }
    187 
    188 WebDOMString WebDOMTestObj::stringAttr() const
    189 {
    190     if (!impl())
    191         return WebDOMString();
    192 
    193     return static_cast<const WTF::String&>(impl()->stringAttr());
    194 }
    195 
    196 void WebDOMTestObj::setStringAttr(const WebDOMString& newStringAttr)
    197 {
    198     if (!impl())
    199         return;
    200 
    201     impl()->setStringAttr(newStringAttr);
    202 }
    203 
    204 WebDOMTestObj WebDOMTestObj::testObjAttr() const
    205 {
    206     if (!impl())
    207         return WebDOMTestObj();
    208 
    209     return toWebKit(WTF::getPtr(impl()->testObjAttr()));
    210 }
    211 
    212 void WebDOMTestObj::setTestObjAttr(const WebDOMTestObj& newTestObjAttr)
    213 {
    214     if (!impl())
    215         return;
    216 
    217     impl()->setTestObjAttr(toWebCore(newTestObjAttr));
    218 }
    219 
    220 WebDOMTestObj WebDOMTestObj::XMLObjAttr() const
    221 {
    222     if (!impl())
    223         return WebDOMTestObj();
    224 
    225     return toWebKit(WTF::getPtr(impl()->xmlObjAttr()));
    226 }
    227 
    228 void WebDOMTestObj::setXMLObjAttr(const WebDOMTestObj& newXMLObjAttr)
    229 {
    230     if (!impl())
    231         return;
    232 
    233     impl()->setXMLObjAttr(toWebCore(newXMLObjAttr));
    234 }
    235 
    236 bool WebDOMTestObj::create() const
    237 {
    238     if (!impl())
    239         return false;
    240 
    241     return impl()->isCreate();
    242 }
    243 
    244 void WebDOMTestObj::setCreate(bool newCreate)
    245 {
    246     if (!impl())
    247         return;
    248 
    249     impl()->setCreate(newCreate);
    250 }
    251 
    252 WebDOMString WebDOMTestObj::reflectedStringAttr() const
    253 {
    254     if (!impl())
    255         return WebDOMString();
    256 
    257     return static_cast<const WTF::String&>(impl()->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
    258 }
    259 
    260 void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr)
    261 {
    262     if (!impl())
    263         return;
    264 
    265     impl()->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr);
    266 }
    267 
    268 int WebDOMTestObj::reflectedIntegralAttr() const
    269 {
    270     if (!impl())
    271         return 0;
    272 
    273     return impl()->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
    274 }
    275 
    276 void WebDOMTestObj::setReflectedIntegralAttr(int newReflectedIntegralAttr)
    277 {
    278     if (!impl())
    279         return;
    280 
    281     impl()->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
    282 }
    283 
    284 unsigned WebDOMTestObj::reflectedUnsignedIntegralAttr() const
    285 {
    286     if (!impl())
    287         return unsigned();
    288 
    289     return impl()->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
    290 }
    291 
    292 void WebDOMTestObj::setReflectedUnsignedIntegralAttr(unsigned newReflectedUnsignedIntegralAttr)
    293 {
    294     if (!impl())
    295         return;
    296 
    297     impl()->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr);
    298 }
    299 
    300 bool WebDOMTestObj::reflectedBooleanAttr() const
    301 {
    302     if (!impl())
    303         return false;
    304 
    305     return impl()->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
    306 }
    307 
    308 void WebDOMTestObj::setReflectedBooleanAttr(bool newReflectedBooleanAttr)
    309 {
    310     if (!impl())
    311         return;
    312 
    313     impl()->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr);
    314 }
    315 
    316 WebDOMString WebDOMTestObj::reflectedURLAttr() const
    317 {
    318     if (!impl())
    319         return WebDOMString();
    320 
    321     return static_cast<const WTF::String&>(impl()->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
    322 }
    323 
    324 void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr)
    325 {
    326     if (!impl())
    327         return;
    328 
    329     impl()->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr);
    330 }
    331 
    332 WebDOMString WebDOMTestObj::reflectedNonEmptyURLAttr() const
    333 {
    334     if (!impl())
    335         return WebDOMString();
    336 
    337     return static_cast<const WTF::String&>(impl()->getNonEmptyURLAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr));
    338 }
    339 
    340 void WebDOMTestObj::setReflectedNonEmptyURLAttr(const WebDOMString& newReflectedNonEmptyURLAttr)
    341 {
    342     if (!impl())
    343         return;
    344 
    345     impl()->setAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr, newReflectedNonEmptyURLAttr);
    346 }
    347 
    348 WebDOMString WebDOMTestObj::reflectedStringAttr() const
    349 {
    350     if (!impl())
    351         return WebDOMString();
    352 
    353     return static_cast<const WTF::String&>(impl()->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
    354 }
    355 
    356 void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr)
    357 {
    358     if (!impl())
    359         return;
    360 
    361     impl()->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr);
    362 }
    363 
    364 int WebDOMTestObj::reflectedCustomIntegralAttr() const
    365 {
    366     if (!impl())
    367         return 0;
    368 
    369     return impl()->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
    370 }
    371 
    372 void WebDOMTestObj::setReflectedCustomIntegralAttr(int newReflectedCustomIntegralAttr)
    373 {
    374     if (!impl())
    375         return;
    376 
    377     impl()->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr);
    378 }
    379 
    380 bool WebDOMTestObj::reflectedCustomBooleanAttr() const
    381 {
    382     if (!impl())
    383         return false;
    384 
    385     return impl()->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
    386 }
    387 
    388 void WebDOMTestObj::setReflectedCustomBooleanAttr(bool newReflectedCustomBooleanAttr)
    389 {
    390     if (!impl())
    391         return;
    392 
    393     impl()->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr);
    394 }
    395 
    396 WebDOMString WebDOMTestObj::reflectedCustomURLAttr() const
    397 {
    398     if (!impl())
    399         return WebDOMString();
    400 
    401     return static_cast<const WTF::String&>(impl()->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
    402 }
    403 
    404 void WebDOMTestObj::setReflectedCustomURLAttr(const WebDOMString& newReflectedCustomURLAttr)
    405 {
    406     if (!impl())
    407         return;
    408 
    409     impl()->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedCustomURLAttr);
    410 }
    411 
    412 WebDOMString WebDOMTestObj::reflectedCustomNonEmptyURLAttr() const
    413 {
    414     if (!impl())
    415         return WebDOMString();
    416 
    417     return static_cast<const WTF::String&>(impl()->getNonEmptyURLAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr));
    418 }
    419 
    420 void WebDOMTestObj::setReflectedCustomNonEmptyURLAttr(const WebDOMString& newReflectedCustomNonEmptyURLAttr)
    421 {
    422     if (!impl())
    423         return;
    424 
    425     impl()->setAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr, newReflectedCustomNonEmptyURLAttr);
    426 }
    427 
    428 int WebDOMTestObj::attrWithGetterException() const
    429 {
    430     if (!impl())
    431         return 0;
    432 
    433     WebCore::ExceptionCode ec = 0;
    434     int result = impl()->attrWithGetterException(ec);
    435     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    436     return result;
    437 }
    438 
    439 void WebDOMTestObj::setAttrWithGetterException(int newAttrWithGetterException)
    440 {
    441     if (!impl())
    442         return;
    443 
    444     WebCore::ExceptionCode ec = 0;
    445     impl()->setAttrWithGetterException(newAttrWithGetterException, ec);
    446     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    447 }
    448 
    449 int WebDOMTestObj::attrWithSetterException() const
    450 {
    451     if (!impl())
    452         return 0;
    453 
    454     return impl()->attrWithSetterException();
    455 }
    456 
    457 void WebDOMTestObj::setAttrWithSetterException(int newAttrWithSetterException)
    458 {
    459     if (!impl())
    460         return;
    461 
    462     WebCore::ExceptionCode ec = 0;
    463     impl()->setAttrWithSetterException(newAttrWithSetterException, ec);
    464     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    465 }
    466 
    467 WebDOMString WebDOMTestObj::stringAttrWithGetterException() const
    468 {
    469     if (!impl())
    470         return WebDOMString();
    471 
    472     WebCore::ExceptionCode ec = 0;
    473     WebDOMString result = impl()->stringAttrWithGetterException(ec);
    474     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    475     return static_cast<const WTF::String&>(result);
    476 }
    477 
    478 void WebDOMTestObj::setStringAttrWithGetterException(const WebDOMString& newStringAttrWithGetterException)
    479 {
    480     if (!impl())
    481         return;
    482 
    483     WebCore::ExceptionCode ec = 0;
    484     impl()->setStringAttrWithGetterException(newStringAttrWithGetterException, ec);
    485     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    486 }
    487 
    488 WebDOMString WebDOMTestObj::stringAttrWithSetterException() const
    489 {
    490     if (!impl())
    491         return WebDOMString();
    492 
    493     return static_cast<const WTF::String&>(impl()->stringAttrWithSetterException());
    494 }
    495 
    496 void WebDOMTestObj::setStringAttrWithSetterException(const WebDOMString& newStringAttrWithSetterException)
    497 {
    498     if (!impl())
    499         return;
    500 
    501     WebCore::ExceptionCode ec = 0;
    502     impl()->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
    503     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    504 }
    505 
    506 WebDOMString WebDOMTestObj::scriptStringAttr() const
    507 {
    508     if (!impl())
    509         return WebDOMString();
    510 
    511     return static_cast<const WTF::String&>(impl()->scriptStringAttr());
    512 }
    513 
    514 #if ENABLE(Condition1)
    515 int WebDOMTestObj::conditionalAttr1() const
    516 {
    517     if (!impl())
    518         return 0;
    519 
    520     return impl()->conditionalAttr1();
    521 }
    522 
    523 void WebDOMTestObj::setConditionalAttr1(int newConditionalAttr1)
    524 {
    525     if (!impl())
    526         return;
    527 
    528     impl()->setConditionalAttr1(newConditionalAttr1);
    529 }
    530 
    531 #endif
    532 #if ENABLE(Condition1) && ENABLE(Condition2)
    533 int WebDOMTestObj::conditionalAttr2() const
    534 {
    535     if (!impl())
    536         return 0;
    537 
    538     return impl()->conditionalAttr2();
    539 }
    540 
    541 void WebDOMTestObj::setConditionalAttr2(int newConditionalAttr2)
    542 {
    543     if (!impl())
    544         return;
    545 
    546     impl()->setConditionalAttr2(newConditionalAttr2);
    547 }
    548 
    549 #endif
    550 #if ENABLE(Condition1) || ENABLE(Condition2)
    551 int WebDOMTestObj::conditionalAttr3() const
    552 {
    553     if (!impl())
    554         return 0;
    555 
    556     return impl()->conditionalAttr3();
    557 }
    558 
    559 void WebDOMTestObj::setConditionalAttr3(int newConditionalAttr3)
    560 {
    561     if (!impl())
    562         return;
    563 
    564     impl()->setConditionalAttr3(newConditionalAttr3);
    565 }
    566 
    567 #endif
    568 int WebDOMTestObj::description() const
    569 {
    570     if (!impl())
    571         return 0;
    572 
    573     return impl()->description();
    574 }
    575 
    576 int WebDOMTestObj::id() const
    577 {
    578     if (!impl())
    579         return 0;
    580 
    581     return impl()->id();
    582 }
    583 
    584 void WebDOMTestObj::setId(int newId)
    585 {
    586     if (!impl())
    587         return;
    588 
    589     impl()->setId(newId);
    590 }
    591 
    592 WebDOMString WebDOMTestObj::hash() const
    593 {
    594     if (!impl())
    595         return WebDOMString();
    596 
    597     return static_cast<const WTF::String&>(impl()->hash());
    598 }
    599 
    600 void WebDOMTestObj::voidMethod()
    601 {
    602     if (!impl())
    603         return;
    604 
    605     impl()->voidMethod();
    606 }
    607 
    608 void WebDOMTestObj::voidMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg)
    609 {
    610     if (!impl())
    611         return;
    612 
    613     impl()->voidMethodWithArgs(intArg, strArg, toWebCore(objArg));
    614 }
    615 
    616 int WebDOMTestObj::intMethod()
    617 {
    618     if (!impl())
    619         return 0;
    620 
    621     return impl()->intMethod();
    622 }
    623 
    624 int WebDOMTestObj::intMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg)
    625 {
    626     if (!impl())
    627         return 0;
    628 
    629     return impl()->intMethodWithArgs(intArg, strArg, toWebCore(objArg));
    630 }
    631 
    632 WebDOMTestObj WebDOMTestObj::objMethod()
    633 {
    634     if (!impl())
    635         return WebDOMTestObj();
    636 
    637     return toWebKit(WTF::getPtr(impl()->objMethod()));
    638 }
    639 
    640 WebDOMTestObj WebDOMTestObj::objMethodWithArgs(int intArg, const WebDOMString& strArg, const WebDOMTestObj& objArg)
    641 {
    642     if (!impl())
    643         return WebDOMTestObj();
    644 
    645     return toWebKit(WTF::getPtr(impl()->objMethodWithArgs(intArg, strArg, toWebCore(objArg))));
    646 }
    647 
    648 WebDOMTestObj WebDOMTestObj::methodThatRequiresAllArgs(const WebDOMString& strArg, const WebDOMTestObj& objArg)
    649 {
    650     if (!impl())
    651         return WebDOMTestObj();
    652 
    653     return toWebKit(WTF::getPtr(impl()->methodThatRequiresAllArgs(strArg, toWebCore(objArg))));
    654 }
    655 
    656 WebDOMTestObj WebDOMTestObj::methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg)
    657 {
    658     if (!impl())
    659         return WebDOMTestObj();
    660 
    661     WebCore::ExceptionCode ec = 0;
    662     WebDOMTestObj result = toWebKit(WTF::getPtr(impl()->methodThatRequiresAllArgsAndThrows(strArg, toWebCore(objArg), ec)));
    663     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    664     return result;
    665 }
    666 
    667 void WebDOMTestObj::serializedValue(const WebDOMString& serializedArg)
    668 {
    669     if (!impl())
    670         return;
    671 
    672     impl()->serializedValue(WebCore::SerializedScriptValue::create(WTF::String(serializedArg)));
    673 }
    674 
    675 void WebDOMTestObj::idbKey(const WebDOMIDBKey& key)
    676 {
    677     if (!impl())
    678         return;
    679 
    680     impl()->idbKey(toWebCore(key));
    681 }
    682 
    683 void WebDOMTestObj::optionsObject(const WebDOMOptionsObject& oo, const WebDOMOptionsObject& ooo)
    684 {
    685     if (!impl())
    686         return;
    687 
    688     impl()->optionsObject(toWebCore(oo), toWebCore(ooo));
    689 }
    690 
    691 void WebDOMTestObj::methodWithException()
    692 {
    693     if (!impl())
    694         return;
    695 
    696     WebCore::ExceptionCode ec = 0;
    697     impl()->methodWithException(ec);
    698     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    699 }
    700 
    701 void WebDOMTestObj::addEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture)
    702 {
    703     if (!impl())
    704         return;
    705 
    706     impl()->addEventListener(type, toWebCore(listener), useCapture);
    707 }
    708 
    709 void WebDOMTestObj::removeEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture)
    710 {
    711     if (!impl())
    712         return;
    713 
    714     impl()->removeEventListener(type, toWebCore(listener), useCapture);
    715 }
    716 
    717 void WebDOMTestObj::withDynamicFrame()
    718 {
    719     if (!impl())
    720         return;
    721 
    722     impl()->withDynamicFrame();
    723 }
    724 
    725 void WebDOMTestObj::withDynamicFrameAndArg(int intArg)
    726 {
    727     if (!impl())
    728         return;
    729 
    730     impl()->withDynamicFrameAndArg(intArg);
    731 }
    732 
    733 void WebDOMTestObj::withDynamicFrameAndOptionalArg(int intArg, int optionalArg)
    734 {
    735     if (!impl())
    736         return;
    737 
    738     impl()->withDynamicFrameAndOptionalArg(intArg, optionalArg);
    739 }
    740 
    741 void WebDOMTestObj::withScriptStateVoid()
    742 {
    743     if (!impl())
    744         return;
    745 
    746     impl()->withScriptStateVoid();
    747 }
    748 
    749 WebDOMTestObj WebDOMTestObj::withScriptStateObj()
    750 {
    751     if (!impl())
    752         return WebDOMTestObj();
    753 
    754     return toWebKit(WTF::getPtr(impl()->withScriptStateObj()));
    755 }
    756 
    757 void WebDOMTestObj::withScriptStateVoidException()
    758 {
    759     if (!impl())
    760         return;
    761 
    762     WebCore::ExceptionCode ec = 0;
    763     impl()->withScriptStateVoidException(ec);
    764     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    765 }
    766 
    767 WebDOMTestObj WebDOMTestObj::withScriptStateObjException()
    768 {
    769     if (!impl())
    770         return WebDOMTestObj();
    771 
    772     WebCore::ExceptionCode ec = 0;
    773     WebDOMTestObj result = toWebKit(WTF::getPtr(impl()->withScriptStateObjException(ec)));
    774     webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec));
    775     return result;
    776 }
    777 
    778 void WebDOMTestObj::withScriptExecutionContext()
    779 {
    780     if (!impl())
    781         return;
    782 
    783     impl()->withScriptExecutionContext();
    784 }
    785 
    786 void WebDOMTestObj::methodWithOptionalArg(int opt)
    787 {
    788     if (!impl())
    789         return;
    790 
    791     impl()->methodWithOptionalArg(opt);
    792 }
    793 
    794 void WebDOMTestObj::methodWithNonOptionalArgAndOptionalArg(int nonOpt, int opt)
    795 {
    796     if (!impl())
    797         return;
    798 
    799     impl()->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
    800 }
    801 
    802 void WebDOMTestObj::methodWithNonOptionalArgAndTwoOptionalArgs(int nonOpt, int opt1, int opt2)
    803 {
    804     if (!impl())
    805         return;
    806 
    807     impl()->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
    808 }
    809 
    810 void WebDOMTestObj::classMethod()
    811 {
    812     if (!impl())
    813         return;
    814 
    815     impl()->classMethod();
    816 }
    817 
    818 int WebDOMTestObj::classMethodWithOptional(int arg)
    819 {
    820     if (!impl())
    821         return 0;
    822 
    823     return impl()->classMethodWithOptional(arg);
    824 }
    825 
    826 WebCore::TestObj* toWebCore(const WebDOMTestObj& wrapper)
    827 {
    828     return wrapper.impl();
    829 }
    830 
    831 WebDOMTestObj toWebKit(WebCore::TestObj* value)
    832 {
    833     return WebDOMTestObj(value);
    834 }
    835