summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:33:47 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:33:47 +0000
commitcf13bb696f6a50b06930ed8fabb0984cd6af7be9 (patch)
treea883217d4a1eee49750954f851188c5ca6fa6308 /chrome/renderer/render_widget.h
parent05158051ea881677c03a22ddf38a3e6779cebb9e (diff)
downloadchromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.zip
chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.gz
chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.bz2
Reverting 20854.
Review URL: http://codereview.chromium.org/155621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.h')
-rw-r--r--chrome/renderer/render_widget.h57
1 files changed, 29 insertions, 28 deletions
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 005b4b6..f1fa069 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -17,10 +17,9 @@
#include "chrome/renderer/render_process.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#include "webkit/api/public/WebCompositionCommand.h"
+
#include "webkit/api/public/WebRect.h"
-#include "webkit/api/public/WebTextDirection.h"
-#include "webkit/api/public/WebWidgetClient.h"
+#include "webkit/glue/webwidget_delegate.h"
#include "webkit/glue/webcursor.h"
class RenderThreadBase;
@@ -35,7 +34,7 @@ struct WebPopupMenuInfo;
// a RenderWidgetHost, the latter of which lives in a different process.
class RenderWidget : public IPC::Channel::Listener,
public IPC::Message::Sender,
- virtual public WebKit::WebWidgetClient,
+ virtual public WebWidgetDelegate,
public base::RefCounted<RenderWidget> {
public:
// Creates a new RenderWidget. The opener_id is the routing ID of the
@@ -57,7 +56,7 @@ class RenderWidget : public IPC::Channel::Listener,
}
// May return NULL when the window is closing.
- WebKit::WebWidget* webwidget() const {
+ WebWidget* webwidget() const {
return webwidget_;
}
@@ -67,24 +66,27 @@ class RenderWidget : public IPC::Channel::Listener,
// IPC::Message::Sender
virtual bool Send(IPC::Message* msg);
- // WebKit::WebWidgetClient
- virtual void didInvalidateRect(const WebKit::WebRect&);
- virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect);
- virtual void didFocus();
- virtual void didBlur();
- virtual void didChangeCursor(const WebKit::WebCursorInfo&);
- virtual void closeWidgetSoon();
- virtual void show(WebKit::WebNavigationPolicy);
- virtual void runModal() {}
- virtual WebKit::WebRect windowRect();
- virtual void setWindowRect(const WebKit::WebRect&);
- virtual WebKit::WebRect windowResizerRect();
- virtual WebKit::WebRect rootWindowRect();
- virtual WebKit::WebScreenInfo screenInfo();
-
- // Called when a plugin is moved. These events are queued up and sent with
- // the next paint or scroll message to the host.
- void SchedulePluginMove(const WebPluginGeometry& move);
+ // WebWidgetDelegate
+ virtual void DidInvalidateRect(WebWidget* webwidget,
+ const WebKit::WebRect& rect);
+ virtual void DidScrollRect(WebWidget* webwidget, int dx, int dy,
+ const WebKit::WebRect& clip_rect);
+ virtual void Show(WebWidget* webwidget, WindowOpenDisposition disposition);
+ virtual void CloseWidgetSoon(WebWidget* webwidget);
+ virtual void Focus(WebWidget* webwidget);
+ virtual void Blur(WebWidget* webwidget);
+ virtual void SetCursor(WebWidget* webwidget,
+ const WebKit::WebCursorInfo& cursor);
+ virtual void GetWindowRect(WebWidget* webwidget, WebKit::WebRect* rect);
+ virtual void SetWindowRect(WebWidget* webwidget,
+ const WebKit::WebRect& rect);
+ virtual void GetRootWindowRect(WebWidget* webwidget, WebKit::WebRect* rect);
+ virtual void GetRootWindowResizerRect(WebWidget* webwidget,
+ WebKit::WebRect* rect);
+ virtual void DidMove(WebWidget* webwidget, const WebPluginGeometry& move);
+ virtual void RunModal(WebWidget* webwidget) {}
+ virtual bool IsHidden(WebWidget* webwidget) { return is_hidden_; }
+ virtual WebKit::WebScreenInfo GetScreenInfo(WebWidget* webwidget);
// Invalidates entire widget rect to generate a full repaint.
void GenerateFullRepaint();
@@ -136,12 +138,11 @@ class RenderWidget : public IPC::Channel::Listener,
void OnMouseCaptureLost();
void OnSetFocus(bool enable);
void OnImeSetInputMode(bool is_active);
- void OnImeSetComposition(WebKit::WebCompositionCommand command,
- int cursor_position,
+ void OnImeSetComposition(int string_type, int cursor_position,
int target_start, int target_end,
- const string16& ime_string);
+ const std::wstring& ime_string);
void OnMsgRepaint(const gfx::Size& size_to_paint);
- void OnSetTextDirection(WebKit::WebTextDirection direction);
+ void OnSetTextDirection(int direction);
// Override point to notify that a paint has happened. This fires after the
// browser side has updated the screen for a newly painted region.
@@ -187,7 +188,7 @@ class RenderWidget : public IPC::Channel::Listener,
int32 routing_id_;
// We are responsible for destroying this object via its Close method.
- WebKit::WebWidget* webwidget_;
+ WebWidget* webwidget_;
// Set to the ID of the view that initiated creating this view, if any. When
// the view was initiated by the browser (the common case), this will be