summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webview_impl.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:11:05 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 05:11:05 +0000
commit05158051ea881677c03a22ddf38a3e6779cebb9e (patch)
tree95c6756227e0bbea55da3c4b19abdf99d7eb3ebe /webkit/glue/webview_impl.h
parent6c14b76fede6abc592d9d65965fbdf4626e83efe (diff)
downloadchromium_src-05158051ea881677c03a22ddf38a3e6779cebb9e.zip
chromium_src-05158051ea881677c03a22ddf38a3e6779cebb9e.tar.gz
chromium_src-05158051ea881677c03a22ddf38a3e6779cebb9e.tar.bz2
Use WebWidget from the WebKit API. This change also makes
use of WebKitClient (replacing WebWidgetDelegate from glue). The ripple effects of this change are rather large, but most of the impact is mechanical. The more interesting changes include: 1- Removing the WebWidget parameter from WebWidgetClient methods. This didn't matter at all to RenderWidget or RenderView, but it did cause some changes to be made to TestWebViewDelegate. Now, it is not possible to share a delegate implementation for both the WebView and a popup menu, so I have a second instance of the delegate owned by TestShell for use with popup menus. 2- Plumbing WebNavigationPolicy in place of WindowOpenDisposition was getting to be a pretty large change, so I stopped short of deleting WindowOpenDisposition. That way the Chrome side can remain mostly unmodified. I then added a mapping function to convert from WebNavigationPolicy to WindowOpenDisposition. 3- The IME methods on WebWidget were renamed (reviewed separately by hbono), and there is now an enum to specify the composition command (WebCompositionCommand). 4- I added IPC serialization for WebCompositionCommand and WebTextDirection, which cleaned up some code that was just using ints in IPC messages. R=jam BUG=16234 TEST=none Review URL: http://codereview.chromium.org/149620 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webview_impl.h')
-rw-r--r--webkit/glue/webview_impl.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index d55df1a..6c2f883 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -49,9 +49,27 @@ class WebViewDelegate;
class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
public:
- // WebView
+ // WebWidget methods:
+ virtual void close();
+ virtual WebKit::WebSize size() { return size_; }
+ virtual void resize(const WebKit::WebSize& new_size);
+ virtual void layout();
+ virtual void paint(WebKit::WebCanvas* canvas,
+ const WebKit::WebRect& rect);
+ virtual bool handleInputEvent(const WebKit::WebInputEvent& input_event);
+ virtual void mouseCaptureLost();
+ virtual void setFocus(bool enable);
+ virtual bool handleCompositionEvent(WebKit::WebCompositionCommand command,
+ int cursor_position,
+ int target_start,
+ int target_end,
+ const WebKit::WebString& text);
+ virtual bool queryCompositionStatus(bool* enabled,
+ WebKit::WebRect* caret_rect);
+ virtual void setTextDirection(WebKit::WebTextDirection direction);
+
+ // WebView methods:
virtual bool ShouldClose();
- virtual void Close();
virtual WebViewDelegate* GetDelegate();
virtual void SetDelegate(WebViewDelegate*);
virtual void SetUseEditorDelegate(bool value);
@@ -62,22 +80,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual WebFrame* GetFrameWithName(const std::wstring& name);
virtual WebFrame* GetPreviousFrameBefore(WebFrame* frame, bool wrap);
virtual WebFrame* GetNextFrameAfter(WebFrame* frame, bool wrap);
- virtual void Resize(const WebKit::WebSize& new_size);
- virtual WebKit::WebSize GetSize() { return size(); }
- virtual void Layout();
- virtual void Paint(skia::PlatformCanvas* canvas, const WebKit::WebRect& rect);
- virtual bool HandleInputEvent(const WebKit::WebInputEvent* input_event);
- virtual void MouseCaptureLost();
- virtual void SetFocus(bool enable);
virtual void ClearFocusedNode();
- virtual bool ImeSetComposition(int string_type,
- int cursor_position,
- int target_start,
- int target_end,
- const std::wstring& ime_string);
- virtual bool ImeUpdateStatus(bool* enable_ime,
- WebKit::WebRect* caret_rect);
- virtual void SetTextDirection(WebTextDirection direction);
virtual void StopLoading();
virtual void SetBackForwardListSize(int size);
virtual void SetInitialFocus(bool reverse);
@@ -130,8 +133,6 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
// WebViewImpl
- const WebKit::WebSize& size() const { return size_; }
-
const WebKit::WebPoint& last_mouse_down_point() const {
return last_mouse_down_point_;
}
@@ -196,11 +197,11 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
}
// Set the disposition for how this webview is to be initially shown.
- void set_window_open_disposition(WindowOpenDisposition disp) {
- window_open_disposition_ = disp;
+ void set_initial_navigation_policy(WebKit::WebNavigationPolicy policy) {
+ initial_navigation_policy_ = policy;
}
- WindowOpenDisposition window_open_disposition() const {
- return window_open_disposition_;
+ WebKit::WebNavigationPolicy initial_navigation_policy() const {
+ return initial_navigation_policy_;
}
// Start a system drag and drop operation.
@@ -303,8 +304,8 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
// this behavior by setting this flag if the keyDown was handled.
bool suppress_next_keypress_event_;
- // The disposition for how this webview is to be initially shown.
- WindowOpenDisposition window_open_disposition_;
+ // The policy for how this webview is to be initially shown.
+ WebKit::WebNavigationPolicy initial_navigation_policy_;
// Represents whether or not this object should process incoming IME events.
bool ime_accept_events_;