summaryrefslogtreecommitdiffstats
path: root/samples/BrowserPlugin
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-08-04 17:51:06 -0700
committerGrace Kloba <klobag@google.com>2009-08-04 17:51:06 -0700
commit9ffe5ac6c4179eebeb1fde5b49d25f799dd4ee37 (patch)
treedfa12ec5542899c7cf34c1eea509373182def0db /samples/BrowserPlugin
parent2574949b8573a5458196ee02401365f4eb8089f3 (diff)
downloadandroid_development-9ffe5ac6c4179eebeb1fde5b49d25f799dd4ee37.tar.gz
android_development-9ffe5ac6c4179eebeb1fde5b49d25f799dd4ee37.tar.bz2
android_development-9ffe5ac6c4179eebeb1fde5b49d25f799dd4ee37.zip
Add the test for the new SystemInterface in the android_npapi.
Diffstat (limited to 'samples/BrowserPlugin')
-rw-r--r--samples/BrowserPlugin/jni/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/samples/BrowserPlugin/jni/main.cpp b/samples/BrowserPlugin/jni/main.cpp
index a0649cda7..119081c6b 100644
--- a/samples/BrowserPlugin/jni/main.cpp
+++ b/samples/BrowserPlugin/jni/main.cpp
@@ -71,6 +71,7 @@ ANPLogInterfaceV0 gLogI;
ANPPaintInterfaceV0 gPaintI;
ANPPathInterfaceV0 gPathI;
ANPSurfaceInterfaceV0 gSurfaceI;
+ANPSystemInterfaceV0 gSystemI;
ANPTypefaceInterfaceV0 gTypefaceI;
ANPWindowInterfaceV0 gWindowI;
@@ -117,7 +118,8 @@ NPError NP_Initialize(NPNetscapeFuncs* browserFuncs, NPPluginFuncs* pluginFuncs,
{ kPaintInterfaceV0_ANPGetValue, sizeof(gPaintI), &gPaintI },
{ kPathInterfaceV0_ANPGetValue, sizeof(gPathI), &gPathI },
{ kSurfaceInterfaceV0_ANPGetValue, sizeof(gSurfaceI), &gSurfaceI },
- { kTypefaceInterfaceV0_ANPGetValue, sizeof(gPaintI), &gTypefaceI },
+ { kSystemInterfaceV0_ANPGetValue, sizeof(gSystemI), &gSystemI },
+ { kTypefaceInterfaceV0_ANPGetValue, sizeof(gTypefaceI), &gTypefaceI },
{ kWindowInterfaceV0_ANPGetValue, sizeof(gWindowI), &gWindowI },
};
for (size_t i = 0; i < ARRAY_COUNT(gPairs); i++) {
@@ -181,6 +183,13 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
return err;
}
+ const char* path = gSystemI.getApplicationDataDirectory();
+ if (path) {
+ gLogI.log(instance, kDebug_ANPLogType, "Application data dir is %s", path);
+ } else {
+ gLogI.log(instance, kError_ANPLogType, "Can't find Application data dir");
+ }
+
// select the pluginType
for (int i = 0; i < argc; i++) {
if (!strcmp(argn[i], "PluginType")) {