summaryrefslogtreecommitdiffstats
path: root/tests/BrowserTestPlugin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/BrowserTestPlugin')
-rw-r--r--tests/BrowserTestPlugin/jni/event/EventPlugin.cpp14
-rw-r--r--tests/BrowserTestPlugin/jni/main.cpp6
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/BrowserTestPlugin/jni/event/EventPlugin.cpp b/tests/BrowserTestPlugin/jni/event/EventPlugin.cpp
index 706c27e..2eff394 100644
--- a/tests/BrowserTestPlugin/jni/event/EventPlugin.cpp
+++ b/tests/BrowserTestPlugin/jni/event/EventPlugin.cpp
@@ -46,7 +46,7 @@ EventPlugin::~EventPlugin() { }
void EventPlugin::drawPlugin(const ANPBitmap& bitmap, const ANPRectI& clip) {
- gLogI.log(inst(), kDebug_ANPLogType, " ------ %p drawing the plugin (%d,%d)",
+ gLogI.log(kDebug_ANPLogType, " ------ %p drawing the plugin (%d,%d)",
inst(), bitmap.width, bitmap.height);
// get the plugin's dimensions according to the DOM
@@ -60,7 +60,7 @@ void EventPlugin::drawPlugin(const ANPBitmap& bitmap, const ANPRectI& clip) {
// check to make sure the zoom level is uniform
if (zoomFactorW + .01 < zoomFactorH && zoomFactorW - .01 > zoomFactorH)
- gLogI.log(inst(), kError_ANPLogType, " ------ %p zoom is out of sync (%f,%f)",
+ gLogI.log(kError_ANPLogType, " ------ %p zoom is out of sync (%f,%f)",
inst(), zoomFactorW, zoomFactorH);
// scale the variables based on the zoom level
@@ -109,7 +109,7 @@ void EventPlugin::printToDiv(const char* text, int length) {
browser->getvalue(inst(), NPNVWindowNPObject, &windowObject);
if (!windowObject)
- gLogI.log(inst(), kError_ANPLogType, " ------ %p Unable to retrieve DOM Window", inst());
+ gLogI.log(kError_ANPLogType, " ------ %p Unable to retrieve DOM Window", inst());
// create a string (JS code) that is stored in memory allocated by the browser
const char* jsBegin = "var outputDiv = document.getElementById('eventOutput'); outputDiv.innerHTML += ' ";
@@ -126,13 +126,13 @@ void EventPlugin::printToDiv(const char* text, int length) {
memcpy(middleMem, text, length);
memcpy(endMem, jsEnd, strlen(jsEnd));
- gLogI.log(inst(), kError_ANPLogType, "text: %.*s\n", totalLength, (char*)beginMem);
+ gLogI.log(kDebug_ANPLogType, "text: %.*s\n", totalLength, (char*)beginMem);
// execute the javascript in the plugin's DOM object
NPString script = { (char*)beginMem, totalLength };
NPVariant scriptVariant;
if (!browser->evaluate(inst(), windowObject, &script, &scriptVariant))
- gLogI.log(inst(), kError_ANPLogType, " ------ %p Unable to eval the JS.", inst());
+ gLogI.log(kError_ANPLogType, " ------ %p Unable to eval the JS.", inst());
// free the memory allocated within the browser
browser->memfree(beginMem);
@@ -170,10 +170,10 @@ int16 EventPlugin::handleEvent(const ANPEvent* evt) {
}
return 1;
case kTouch_ANPEventType:
- gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request touch events", inst());
+ gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request touch events", inst());
break;
case kKey_ANPEventType:
- gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request key events", inst());
+ gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request key events", inst());
break;
default:
break;
diff --git a/tests/BrowserTestPlugin/jni/main.cpp b/tests/BrowserTestPlugin/jni/main.cpp
index 2f295f0..c896ad5 100644
--- a/tests/BrowserTestPlugin/jni/main.cpp
+++ b/tests/BrowserTestPlugin/jni/main.cpp
@@ -134,7 +134,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
{
- gLogI.log(instance, kDebug_ANPLogType, "creating plugin");
+ gLogI.log(kDebug_ANPLogType, "creating plugin");
PluginObject *obj = NULL;
@@ -155,7 +155,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
NPError err = browser->setvalue(instance, kRequestDrawingModel_ANPSetValue,
reinterpret_cast<void*>(model));
if (err) {
- gLogI.log(instance, kError_ANPLogType, "request model %d err %d", model, err);
+ gLogI.log(kError_ANPLogType, "request model %d err %d", model, err);
return err;
}
@@ -220,7 +220,7 @@ int16 NPP_HandleEvent(NPP instance, void* event)
const ANPEvent* evt = reinterpret_cast<const ANPEvent*>(event);
if(!obj->subPlugin) {
- gLogI.log(instance, kError_ANPLogType, "the sub-plugin is null.");
+ gLogI.log(kError_ANPLogType, "the sub-plugin is null.");
return 0; // unknown or unhandled event
}
else {