2 * This file is part of the WebKit open source project.
3 * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
25 #include "WebDOMTestCallback.h"
30 #include "DOMStringList.h"
32 #include "TestCallback.h"
33 #include "WebDOMClass1.h"
34 #include "WebDOMClass2.h"
35 #include "WebDOMClass3.h"
36 #include "WebDOMDOMStringList.h"
37 #include "WebDOMString.h"
38 #include "WebExceptionHandler.h"
39 #include "wtf/text/AtomicString.h"
40 #include <wtf/GetPtr.h>
41 #include <wtf/RefPtr.h>
43 struct WebDOMTestCallback::WebDOMTestCallbackPrivate {
44 WebDOMTestCallbackPrivate(WebCore::TestCallback* object = 0)
49 RefPtr<WebCore::TestCallback> impl;
52 WebDOMTestCallback::WebDOMTestCallback()
58 WebDOMTestCallback::WebDOMTestCallback(WebCore::TestCallback* impl)
60 , m_impl(new WebDOMTestCallbackPrivate(impl))
64 WebDOMTestCallback::WebDOMTestCallback(const WebDOMTestCallback& copy)
67 m_impl = copy.impl() ? new WebDOMTestCallbackPrivate(copy.impl()) : 0;
70 WebDOMTestCallback& WebDOMTestCallback::operator=(const WebDOMTestCallback& copy)
73 m_impl = copy.impl() ? new WebDOMTestCallbackPrivate(copy.impl()) : 0;
77 WebCore::TestCallback* WebDOMTestCallback::impl() const
79 return m_impl ? m_impl->impl.get() : 0;
82 WebDOMTestCallback::~WebDOMTestCallback()
88 bool WebDOMTestCallback::callbackWithNoParam()
93 return impl()->callbackWithNoParam();
96 bool WebDOMTestCallback::callbackWithClass1Param(const WebDOMClass1& class1Param)
101 return impl()->callbackWithClass1Param(toWebCore(class1Param));
104 bool WebDOMTestCallback::callbackWithClass2Param(const WebDOMClass2& class2Param, const WebDOMString& strArg)
109 return impl()->callbackWithClass2Param(toWebCore(class2Param), strArg);
112 int WebDOMTestCallback::callbackWithNonBoolReturnType(const WebDOMClass3& class3Param)
117 return impl()->callbackWithNonBoolReturnType(toWebCore(class3Param));
120 bool WebDOMTestCallback::callbackWithStringList(const WebDOMDOMStringList& listParam)
125 return impl()->callbackWithStringList(toWebCore(listParam));
128 WebCore::TestCallback* toWebCore(const WebDOMTestCallback& wrapper)
130 return wrapper.impl();
133 WebDOMTestCallback toWebKit(WebCore::TestCallback* value)
135 return WebDOMTestCallback(value);
138 #endif // ENABLE(DATABASE)