summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-14 04:15:16 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-14 04:15:16 +0000
commit0afe827a49501c6801c3c9efbbdb1f64aa010beb (patch)
treedba6031dd45eb3f0a0435b9750976b1cd432abc1 /webkit
parent27eef9c8edf84061f4e36a3bd26ff7538092a22b (diff)
downloadchromium_src-0afe827a49501c6801c3c9efbbdb1f64aa010beb.zip
chromium_src-0afe827a49501c6801c3c9efbbdb1f64aa010beb.tar.gz
chromium_src-0afe827a49501c6801c3c9efbbdb1f64aa010beb.tar.bz2
Add early-injection capability to user scripts.
Review URL: http://codereview.chromium.org/19624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc6
-rw-r--r--webkit/glue/webview_delegate.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index aaf3500..f8acc50 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -101,8 +101,10 @@ void WebFrameLoaderClient::windowObjectCleared() {
}
void WebFrameLoaderClient::documentElementAvailable() {
- // TODO(aa): Implement.
- notImplemented();
+ WebViewImpl* webview = webframe_->webview_impl();
+ WebViewDelegate* d = webview->delegate();
+ if (d)
+ d->DocumentElementAvailable(webframe_);
}
void WebFrameLoaderClient::didPerformFirstNavigation() const {
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 2fe2351..892c25e 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -198,6 +198,12 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
virtual void WindowObjectCleared(WebFrame* webframe) {
}
+ // Notifies that the documentElement for the document in a webframe has been
+ // created. This is called before anything else is parsed or executed for the
+ // document.
+ virtual void DocumentElementAvailable(WebFrame* webframe) {
+ }
+
// PolicyDelegate ----------------------------------------------------------
// This method is called to notify the delegate, and let it modify a