diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-23 09:28:44 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-23 09:28:44 +0200 |
| commit | 815f1ed417bd26fbe2abbdf20ac5d3423b30796c (patch) | |
| tree | 923c9a9e2834ccab60f5caecfb8f0ac410c1dd9e /Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp | |
| parent | b4ad5d9d2b96baacd0180ead50de5195ca78af2d (diff) | |
| download | qtwebkit-815f1ed417bd26fbe2abbdf20ac5d3423b30796c.tar.gz | |
Imported WebKit commit e65cbc5b6ac32627c797e7fc7f46eb7794410c92 (http://svn.webkit.org/repository/webkit/trunk@123308)
New snapshot with better configure tests
Diffstat (limited to 'Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp')
| -rw-r--r-- | Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp b/Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp index 5cfb2c2f8..c0d532a07 100644 --- a/Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp +++ b/Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp @@ -34,24 +34,58 @@ #include "GamepadController.h" #include "platform/WebString.h" +#include <wtf/OwnPtr.h> + using WebKit::WebFrame; using WebKit::WebString; -TestInterfaces::TestInterfaces() +class TestInterfaces::Internal { +public: + Internal(); + ~Internal(); + + void bindTo(WebFrame*); + void resetAll(); + +private: + OwnPtr<GamepadController> m_gamepadController; +}; + +TestInterfaces::Internal::Internal() { m_gamepadController = adoptPtr(new GamepadController()); } +TestInterfaces::Internal::~Internal() +{ +} + +void TestInterfaces::Internal::bindTo(WebFrame* frame) +{ + m_gamepadController->bindToJavascript(frame, WebString::fromUTF8("gamepadController")); +} + +void TestInterfaces::Internal::resetAll() +{ + m_gamepadController->reset(); +} + +TestInterfaces::TestInterfaces() + : m_internal(new TestInterfaces::Internal()) +{ +} + TestInterfaces::~TestInterfaces() { + delete m_internal; } void TestInterfaces::bindTo(WebFrame* frame) { - m_gamepadController->bindToJavascript(frame, WebString::fromUTF8("gamepadController")); + m_internal->bindTo(frame); } void TestInterfaces::resetAll() { - m_gamepadController->reset(); + m_internal->resetAll(); } |
