QtPlatformPlugin.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public License
  15. * along with this library; see the file COPYING.LIB. If not, write to
  16. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17. * Boston, MA 02110-1301, USA.
  18. *
  19. */
  20. #ifndef QtPlatformPlugin_h
  21. #define QtPlatformPlugin_h
  22. #include <QPluginLoader>
  23. #include <wtf/PassOwnPtr.h>
  24. class QWebSelectMethod;
  25. class QWebKitPlatformPlugin;
  26. class QWebNotificationPresenter;
  27. class QWebHapticFeedbackPlayer;
  28. class QWebSelectData;
  29. class QWebTouchModifier;
  30. #if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
  31. class QWebFullScreenVideoHandler;
  32. #endif
  33. class QWebSpellChecker;
  34. namespace WebCore {
  35. class QtPlatformPlugin {
  36. public:
  37. QtPlatformPlugin()
  38. : m_loaded(false)
  39. , m_plugin(0)
  40. {
  41. }
  42. ~QtPlatformPlugin();
  43. PassOwnPtr<QWebSelectMethod> createSelectInputMethod();
  44. PassOwnPtr<QWebNotificationPresenter> createNotificationPresenter();
  45. PassOwnPtr<QWebHapticFeedbackPlayer> createHapticFeedbackPlayer();
  46. PassOwnPtr<QWebTouchModifier> createTouchModifier();
  47. #if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
  48. PassOwnPtr<QWebFullScreenVideoHandler> createFullScreenVideoHandler();
  49. #endif
  50. PassOwnPtr<QWebSpellChecker> createSpellChecker();
  51. QWebKitPlatformPlugin* plugin();
  52. private:
  53. bool m_loaded;
  54. QWebKitPlatformPlugin* m_plugin;
  55. QPluginLoader m_loader;
  56. bool load();
  57. bool load(const QString& file);
  58. bool loadStaticallyLinkedPlugin();
  59. };
  60. }
  61. #endif // QtPlatformPlugin_h