diff options
Diffstat (limited to 'webkit/glue/webview_delegate.h')
-rw-r--r-- | webkit/glue/webview_delegate.h | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h index 1ccc761..e41a7bf 100644 --- a/webkit/glue/webview_delegate.h +++ b/webkit/glue/webview_delegate.h @@ -29,9 +29,10 @@ #include <vector> #include "base/gfx/native_widget_types.h" +#include "webkit/api/public/WebNavigationPolicy.h" #include "webkit/api/public/WebNavigationType.h" +#include "webkit/api/public/WebWidgetClient.h" #include "webkit/glue/context_menu.h" -#include "webkit/glue/webwidget_delegate.h" namespace webkit_glue { class WebMediaPlayerDelegate; @@ -51,13 +52,13 @@ class WebMediaPlayer; class WebMediaPlayerClient; class WebURLRequest; class WebURLResponse; +class WebWidget; struct WebPoint; struct WebPopupMenuInfo; struct WebRect; struct WebURLError; } -struct WebPreferences; class FilePath; class SkBitmap; class WebDevToolsAgentDelegate; @@ -65,7 +66,8 @@ class WebFrame; class WebMediaPlayerDelegate; class WebPluginDelegate; class WebView; -class WebWidget; +struct WebPluginGeometry; +struct WebPreferences; enum NavigationGesture { NavigationGestureUser, // User initiated navigation/load. This is not @@ -96,8 +98,8 @@ class WebFileChooserCallback { // Inheritance here is somewhat weird, but since a WebView is a WebWidget, -// it makes sense that a WebViewDelegate is a WebWidgetDelegate. -class WebViewDelegate : virtual public WebWidgetDelegate { +// it makes sense that a WebViewDelegate is a WebWidgetClient. +class WebViewDelegate : virtual public WebKit::WebWidgetClient { public: // WebView additions ------------------------------------------------------- @@ -116,13 +118,15 @@ class WebViewDelegate : virtual public WebWidgetDelegate { // This method is called to create a new WebWidget to act as a popup // (like a drop-down menu). - virtual WebWidget* CreatePopupWidget(WebView* webview, bool activatable) { + virtual WebKit::WebWidget* CreatePopupWidget( + WebView* webview, + bool activatable) { return NULL; } // Like CreatePopupWidget, except the actual widget is rendered by the // embedder using the supplied info. - virtual WebWidget* CreatePopupWidgetWithInfo( + virtual WebKit::WebWidget* CreatePopupWidgetWithInfo( WebView* webview, const WebKit::WebPopupMenuInfo& info) { return NULL; @@ -164,7 +168,7 @@ class WebViewDelegate : virtual public WebWidgetDelegate { // This method is called to open a URL in the specified manner. virtual void OpenURL(WebView* webview, const GURL& url, const GURL& referrer, - WindowOpenDisposition disposition) { + WebKit::WebNavigationPolicy policy) { } // Notifies how many matches have been found so far, for a given request_id. @@ -197,6 +201,12 @@ class WebViewDelegate : virtual public WebWidgetDelegate { virtual void FocusAccessibilityObject(WebCore::AccessibilityObject* acc_obj) { } + // Keeps track of the necessary window move for a plugin window that resulted + // from a scroll operation. That way, all plugin windows can be moved at the + // same time as each other and the page. + virtual void DidMovePlugin(const WebPluginGeometry& move) { + } + // FrameLoaderClient ------------------------------------------------------- virtual bool CanAcceptLoadDrops() const { @@ -248,20 +258,20 @@ class WebViewDelegate : virtual public WebWidgetDelegate { // proposed navigation. It will be called before loading starts, and // on every redirect. // - // disposition specifies what should normally happen for this + // default_policy specifies what should normally happen for this // navigation (open in current tab, start a new tab, start a new - // window, etc). This method can return an altered disposition, and + // window, etc). This method can return an altered policy, and // take any additional separate action it wants to. // // is_redirect is true if this is a redirect rather than user action. - virtual WindowOpenDisposition DispositionForNavigationAction( + virtual WebKit::WebNavigationPolicy PolicyForNavigationAction( WebView* webview, WebFrame* frame, const WebKit::WebURLRequest& request, WebKit::WebNavigationType type, - WindowOpenDisposition disposition, + WebKit::WebNavigationPolicy default_policy, bool is_redirect) { - return disposition; + return default_policy; } // FrameLoadDelegate ------------------------------------------------------- @@ -525,8 +535,8 @@ class WebViewDelegate : virtual public WebWidgetDelegate { const std::wstring& value) { } - virtual void DidContentsSizeChange(WebWidget* webwidget, int new_width, - int new_height) { + virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, + int new_width, int new_height) { } // UIDelegate -------------------------------------------------------------- |