/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h

http://github.com/CyanogenMod/android_external_webkit · C++ Header · 126 lines · 74 code · 34 blank · 18 comment · 0 complexity · cd47d4012bf670b60b715b0cfc964a6c MD5 · raw file

  1. /*
  2. * Copyright (C) 2007 Holger Hans Peter Freyther
  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. #ifndef ChromeClientGtk_h
  20. #define ChromeClientGtk_h
  21. #include "ChromeClient.h"
  22. #include "KURL.h"
  23. typedef struct _WebKitWebView WebKitWebView;
  24. namespace WebKit {
  25. class ChromeClient : public WebCore::ChromeClient {
  26. public:
  27. ChromeClient(WebKitWebView*);
  28. WebKitWebView* webView() const { return m_webView; }
  29. virtual void chromeDestroyed();
  30. virtual void setWindowRect(const WebCore::FloatRect&);
  31. virtual WebCore::FloatRect windowRect();
  32. virtual WebCore::FloatRect pageRect();
  33. virtual float scaleFactor();
  34. virtual void focus();
  35. virtual void unfocus();
  36. virtual bool canTakeFocus(WebCore::FocusDirection);
  37. virtual void takeFocus(WebCore::FocusDirection);
  38. virtual void focusedNodeChanged(WebCore::Node*);
  39. virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
  40. virtual void show();
  41. virtual bool canRunModal();
  42. virtual void runModal();
  43. virtual void setToolbarsVisible(bool);
  44. virtual bool toolbarsVisible();
  45. virtual void setStatusbarVisible(bool);
  46. virtual bool statusbarVisible();
  47. virtual void setScrollbarsVisible(bool);
  48. virtual bool scrollbarsVisible();
  49. virtual void setMenubarVisible(bool);
  50. virtual bool menubarVisible();
  51. virtual void setResizable(bool);
  52. virtual void addMessageToConsole(WebCore::MessageSource source, WebCore::MessageType type,
  53. WebCore::MessageLevel level, const WebCore::String& message,
  54. unsigned int lineNumber, const WebCore::String& sourceID);
  55. virtual bool canRunBeforeUnloadConfirmPanel();
  56. virtual bool runBeforeUnloadConfirmPanel(const WebCore::String& message, WebCore::Frame* frame);
  57. virtual void closeWindowSoon();
  58. virtual void runJavaScriptAlert(WebCore::Frame*, const WebCore::String&);
  59. virtual bool runJavaScriptConfirm(WebCore::Frame*, const WebCore::String&);
  60. virtual bool runJavaScriptPrompt(WebCore::Frame*, const WebCore::String& message, const WebCore::String& defaultValue, WebCore::String& result);
  61. virtual void setStatusbarText(const WebCore::String&);
  62. virtual bool shouldInterruptJavaScript();
  63. virtual bool tabsToLinks() const;
  64. virtual WebCore::IntRect windowResizerRect() const;
  65. virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
  66. virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect);
  67. virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const;
  68. virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const;
  69. virtual PlatformPageClient platformPageClient() const;
  70. virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const;
  71. virtual void scrollbarsModeDidChange() const;
  72. virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
  73. virtual void setToolTip(const WebCore::String&, WebCore::TextDirection);
  74. virtual void print(WebCore::Frame*);
  75. #if ENABLE(DATABASE)
  76. virtual void exceededDatabaseQuota(WebCore::Frame*, const WebCore::String&);
  77. #endif
  78. #if ENABLE(OFFLINE_WEB_APPLICATIONS)
  79. virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
  80. #endif
  81. virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
  82. virtual void formStateDidChange(const WebCore::Node*) { }
  83. virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
  84. virtual bool setCursor(WebCore::PlatformCursorHandle);
  85. virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const {}
  86. virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
  87. private:
  88. WebKitWebView* m_webView;
  89. WebCore::KURL m_hoveredLinkURL;
  90. };
  91. }
  92. #endif // ChromeClient_h