summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2009-08-04 15:01:13 -0400
committerDerek Sollenberger <djsollen@google.com>2009-08-04 15:02:12 -0400
commit10c34b4139f0041a0dac539139c7dbee46595b2c (patch)
treea8c00a68352981c0c788c86fed882ee57bc15edd
parente65a5905dd4459ab5e4ef22d6dcb85e1d1a0b7cb (diff)
downloadexternal_webkit-10c34b4139f0041a0dac539139c7dbee46595b2c.zip
external_webkit-10c34b4139f0041a0dac539139c7dbee46595b2c.tar.gz
external_webkit-10c34b4139f0041a0dac539139c7dbee46595b2c.tar.bz2
adding the first cut for the onLoad plugin event.
-rw-r--r--WebKit/android/jni/WebViewCore.cpp6
-rw-r--r--WebKit/android/plugins/android_npapi.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 43a077f..35aeedb 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -885,6 +885,12 @@ void WebViewCore::notifyProgressFinished()
m_check_domtree_version = true;
updateFrameCache();
sendNotifyProgressFinished();
+
+ // trigger an event notifying the plugins that the page has loaded
+ ANPEvent event;
+ SkANP::InitEvent(&event, kLifecycle_ANPEventType);
+ event.data.lifecycle.action = kOnLoad_ANPLifecycleAction;
+ sendPluginEvent(event);
}
void WebViewCore::doMaxScroll(CacheBuilder::Direction dir)
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h
index 80fd2c4..0425e8e 100644
--- a/WebKit/android/plugins/android_npapi.h
+++ b/WebKit/android/plugins/android_npapi.h
@@ -793,6 +793,7 @@ enum ANPLifecycleActions {
kGainFocus_ANPLifecycleAction = 2,
kLoseFocus_ANPLifecycleAction = 3,
kFreeMemory_ANPLifecycleAction = 4,
+ kOnLoad_ANPLifecycleAction = 5,
};
typedef uint32_t ANPLifecycleAction;