summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 20:20:47 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 20:20:47 +0000
commitd750e4d1052bd33755326f122bb2ab73df9e0079 (patch)
treecbd51d5ddc906d39cd63d77190fa5184a5eafb3b /webkit/glue
parent34cc1917d8003c107c1c320e5b50fe240de8a010 (diff)
downloadchromium_src-d750e4d1052bd33755326f122bb2ab73df9e0079.zip
chromium_src-d750e4d1052bd33755326f122bb2ab73df9e0079.tar.gz
chromium_src-d750e4d1052bd33755326f122bb2ab73df9e0079.tar.bz2
Reverting 23068.
Review URL: http://codereview.chromium.org/165316 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23071 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webview.h3
-rw-r--r--webkit/glue/webview_delegate.h5
-rw-r--r--webkit/glue/webview_impl.cc4
-rw-r--r--webkit/glue/webview_impl.h1
4 files changed, 11 insertions, 2 deletions
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index c329452..6e2c794 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -66,6 +66,9 @@ class WebView : public WebKit::WebWidget {
// it, it will be NULL during closing of the view.
virtual WebViewDelegate* GetDelegate() = 0;
+ // Changes the delegate for this WebView. It is valid to set this to NULL.
+ virtual void SetDelegate(WebViewDelegate* delegate) = 0;
+
// Instructs the EditorClient whether to pass editing notifications on to a
// delegate, if one is present. This allows embedders that haven't
// overridden any editor delegate methods to avoid the performance impact of
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 826d1a7..7d421af 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -845,9 +845,10 @@ class WebViewDelegate : virtual public WebKit::WebWidgetClient {
virtual void DidAddHistoryItem() { }
WebViewDelegate() { }
+ virtual ~WebViewDelegate() { }
- protected:
- ~WebViewDelegate() { }
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebViewDelegate);
};
#endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 16bc819..c1c1f1e 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -1246,6 +1246,10 @@ WebViewDelegate* WebViewImpl::GetDelegate() {
return delegate_;
}
+void WebViewImpl::SetDelegate(WebViewDelegate* delegate) {
+ delegate_ = delegate;
+}
+
WebFrame* WebViewImpl::GetMainFrame() {
return main_frame();
}
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 275faed..f2ea84b 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -76,6 +76,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual bool ShouldClose();
virtual void ClosePage();
virtual WebViewDelegate* GetDelegate();
+ virtual void SetDelegate(WebViewDelegate*);
virtual void SetUseEditorDelegate(bool value);
virtual void SetTabKeyCyclesThroughElements(bool value);
virtual WebKit::WebFrame* GetMainFrame();