Changes On Branch chrome-testing

Changes In Branch chrome-testing Excluding Merge-Ins

This is equivalent to a diff from 9e3e9917fe to 233bfb6414

2017-03-09
01:19
Reverted [317e74ef9b], moving PIN dialog changes to a different branch check-in: ecf15c25f8 user: rkeene tags: trunk
01:17
Added test code, untested Leaf check-in: 233bfb6414 user: rkeene tags: chrome-testing
01:16
Updated to include original request when an error occurs check-in: 9e3e9917fe user: rkeene tags: trunk
2016-10-21
18:08
CACKey 0.7.8 check-in: 74206459ad user: kvanals tags: 0.7.8, trunk

Modified build/chrome/cackey-chrome-plugin.cc from [77c6f00e8d] to [2d769e72a7].

271
272
273
274
275
276
277

















































};

namespace pp {
	Module *CreateModule() {
		return(new CACKeyModule());
	}
}
























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
};

namespace pp {
	Module *CreateModule() {
		return(new CACKeyModule());
	}
}

#include "ppapi/c/ppb_core.h"
static PP_Bool isMainThread(void) {
	return((PP_Bool) true);
}

extern "C" const void *ifaces(const char *name) {
	fprintf(stderr, "Asked to give an interface for \"%s\"\n", name);

	if (strcmp(name, "PPB_Core;1.0") == 0) {
		static struct PPB_Core_1_0 x = {0};

		x.IsMainThread = isMainThread;

		fprintf(stderr, "Returning x\n");

		return(&x);
	}

	return(NULL);
}

extern "C" int main(int argc, char **argv) {
	pp::Module *mod;
	pp::Instance *inst;
	PP_Instance instance = 0;

	mod = new CACKeyModule();

	mod->InternalInit(mod->pp_module(), ifaces);

	inst = new CACKeyInstance(instance, mod->core());

	{
		pp::Var *message;
		pp::VarDictionary messageDict;

		messageDict.Set("target", "cackey");
		messageDict.Set("command", "init");

		message = new pp::Var(messageDict.pp_var());

		inst->HandleMessage(*message);
	}

        printf("Hello, World !, inst = %p\n", inst);

        return(0);
}