summaryrefslogtreecommitdiffstats
path: root/WebKit/android/plugins/android_npapi.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-03-23 14:07:05 -0400
committerDerek Sollenberger <djsollen@google.com>2010-03-23 14:34:09 -0400
commit27a298a6476fbd78e67f35441e1428bc878a969d (patch)
treeca631f680e2bc3b4c0a8d54ec3b6c983d4c1c26c /WebKit/android/plugins/android_npapi.h
parent7d7e576868fe78bf1b95968ad5d6ddc395c65ec9 (diff)
downloadexternal_webkit-27a298a6476fbd78e67f35441e1428bc878a969d.zip
external_webkit-27a298a6476fbd78e67f35441e1428bc878a969d.tar.gz
external_webkit-27a298a6476fbd78e67f35441e1428bc878a969d.tar.bz2
Allowing native code access to the application context as long as
there is at least one valid instance of the webviewcore class. This change allows plugins access to the application context when the plugin package is loaded, prior to any instances of the plugin being created. Change-Id: I74a58cf76cc3c2d0ef7bca19346f13f58f616830
Diffstat (limited to 'WebKit/android/plugins/android_npapi.h')
-rw-r--r--WebKit/android/plugins/android_npapi.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h
index b4974f4..25cee97 100644
--- a/WebKit/android/plugins/android_npapi.h
+++ b/WebKit/android/plugins/android_npapi.h
@@ -126,7 +126,14 @@ typedef uint32_t ANPMatrixFlag;
*/
#define kSupportedDrawingModel_ANPGetValue ((NPNVariable)2000)
-/** queries for the context (android.content.Context) in which the plugin resides
+/** queries for the context (android.content.Context) of the plugin. If no
+ instance is specified the application's context is returned. If the instance
+ is given then the context returned is identical to the context used to
+ create the webview in which that instance resides.
+
+ NOTE: Holding onto a non-application context after your instance has been
+ destroyed will cause a memory leak. Refer to the android documentation to
+ determine what context is best suited for your particular scenario.
NPN_GetValue(inst, kJavaContext_ANPGetValue, jobject context)
*/