summaryrefslogtreecommitdiffstats
path: root/webkit/port/platform/chromium/WidgetChromium.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/port/platform/chromium/WidgetChromium.cpp')
-rw-r--r--webkit/port/platform/chromium/WidgetChromium.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/webkit/port/platform/chromium/WidgetChromium.cpp b/webkit/port/platform/chromium/WidgetChromium.cpp
index 9b84698..e980370 100644
--- a/webkit/port/platform/chromium/WidgetChromium.cpp
+++ b/webkit/port/platform/chromium/WidgetChromium.cpp
@@ -26,33 +26,12 @@
#include "config.h"
#include "Widget.h"
+#include "ChromiumBridge.h"
#include "Assertions.h"
-#include "ChromeClientChromium.h"
-#include "Frame.h"
-#include "FrameView.h"
-#include "Page.h"
#include "NotImplemented.h"
namespace WebCore {
-ChromeClientChromium* chromeClientChromium(Widget* widget)
-{
- FrameView* view;
- if (widget->isFrameView()) {
- view = static_cast<FrameView*>(widget);
- } else if (widget->parent() && widget->parent()->isFrameView()) {
- view = static_cast<FrameView*>(widget->parent());
- } else {
- return 0;
- }
-
- Page* page = view->frame() ? view->frame()->page() : 0;
- if (!page)
- return 0;
-
- return static_cast<ChromeClientChromium*>(page->chrome()->client());
-}
-
Widget::Widget(PlatformWidget widget)
{
init(widget);
@@ -73,9 +52,7 @@ void Widget::hide()
void Widget::setCursor(const Cursor& cursor)
{
- ChromeClientChromium* client = chromeClientChromium(this);
- if (client)
- client->setCursor(cursor);
+ ChromiumBridge::widgetSetCursor(this, cursor);
}
void Widget::paint(GraphicsContext*, const IntRect&)
@@ -84,9 +61,7 @@ void Widget::paint(GraphicsContext*, const IntRect&)
void Widget::setFocus()
{
- ChromeClientChromium* client = chromeClientChromium(this);
- if (client)
- client->focus();
+ ChromiumBridge::widgetSetFocus(this);
}
void Widget::setIsSelected(bool)