google-nativeclient

Calling Windows API from Native Client/Pepper Plugin

我们两清 提交于 2019-12-06 03:56:05
问题 My intention is to create a chrome plugin for the windows users. Is that possible to call windows api from Native Client /PPAPI. If possible how? 回答1: I am answering my question, as after some study, I found the answer from West a bit not right. I tried calling windows APIs in Pepper(PPAPI) Plugin and it works fine with a command line switch "--register-pepper-plugins" (not the --no-sandbox as specified by West). It seems safer to use this command line attribute as it is only registering a

C++ Difference Between const char* and const char[]

て烟熏妆下的殇ゞ 提交于 2019-12-05 14:07:56
I read a question on the difference between: const char* and const char[] where as for a while, I though arrays were just syntactic sugar for pointers. But something is bugging me, I have a pice of code similar to the following: namespace SomeNamespace { const char* str = { 'b', 'l', 'a', 'h' }; } I get, error: scaler object 'str' requires one element in initializer. So, I tried this: namespace SomeNamespace { const char str[] = { 'b', 'l', 'a', 'h' }; } It worked, at first I thought this may have to do with the fact that an extra operation is applied when it is a const char*, and GCC is never

Google Native Client, sending binary data from NACL to the frontend

被刻印的时光 ゝ 提交于 2019-12-05 03:02:32
How do I send binary data, e.g. mp3/mp4 data back to the frontend ? I know there are two ways of doing it: utilizing the sandbox filesystem provided by NACL and get the url at the frontend; passing the data through the PostMessage() using VarArrayBuffer . It would be great if someone could give me a simple example of how to pass the binary data through PostMessage() . There is a Pong example for NACl FileSystem API but I 'm kind of confused on how to retrieve the file location as url so that the frontend JS could get it through the message. Here is what I have done so far, using the second

How to write a new image format decoder in Chrome Browser

北城余情 提交于 2019-12-04 19:27:46
Browsers have poor support of image formats. Actually only GIF, JPG, PNG and WebP are supported. I would like to had a new one : JBIG2 From the end user point of view, he will only download and install a chrome extension and his browser will be able to decode the new image format. From the web developer point of view, new format will be transparent and compatible with tag img, canvas and css. To display JBIG2 images, he still uses : <img src=“path/to/myImage.jbig2”> or var myImage = new Image(); myImage.addEventListener( 'load', function() { // insert in canvas, when image is loaded });

Are there any examples of compiling C# code using Mono so that the exe can run with Google's native client support?

徘徊边缘 提交于 2019-12-04 12:09:53
问题 I have found a press release that states that Mono now support compilation for native client. It's unclear whether this is only available from the separate github mono fork, or as part of the standard distribution. I've built the forked mono distribution, but I have been unable to find any examples on how to build a native client executable so that I can run it in Chrome. Is anyone aware of an example project, or can you provide an example for how to build a Mono application for NaCl? 回答1: I

Can't get NaCl C++ module to load file from within packaged app

≯℡__Kan透↙ 提交于 2019-12-04 08:18:20
I have a chrome packaged app that also includes a PNaCl/NaCl C++ module, as well as some data files which the NaCl module needs to read in. However, I am not able to get it to read in the files. I set it up according to all the documentation and official examples that I could find, as well as the answer to: How to include a data file in a chrome app for a native client module to read The nacl_io demo that comes with the SDK is able to do this, but it is in C, not C++. I came up with a simple example, which I'll post below. When you press the button on the page, the NaCl module should load the

Are there any examples of compiling C# code using Mono so that the exe can run with Google's native client support?

此生再无相见时 提交于 2019-12-03 06:53:22
I have found a press release that states that Mono now support compilation for native client. It's unclear whether this is only available from the separate github mono fork, or as part of the standard distribution. I've built the forked mono distribution, but I have been unable to find any examples on how to build a native client executable so that I can run it in Chrome. Is anyone aware of an example project, or can you provide an example for how to build a Mono application for NaCl? I think some of the changes may have been upstreamed, but as of today (11/16/11) there are definitely bugfixes

Google Chrome Extension using NaCL with an external library

耗尽温柔 提交于 2019-12-01 07:28:43
问题 I'm developing a Google Chrome extension using the NaCL. It's pretty cool and easy to use, but I have a doubt. My extension needs the GPGME (GnuPG Made Easy), so I compile that library with '--enable-shared' option and added the library to the .mnf file: { ... "files": { "libgpgme.so": { "x86-64": { "url": "libs/libgpgme.so" }, "x86-32": { "url": "libs/libgpgme.so" } } ... } I also update the makefile with option '-lgpgme' but when I compile my .nexe I have the follow erro: "libgpgme.so: file

Can I run Google's Native Client outside of the browser?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 01:16:08
Is it possible to run Google NaCl outside of the browser as a process sandbox? The Native Client documentation is probably a good starting point for trying to figure out how everything works. As Mark Seaborn and Bennet Yee indicate, you are probably best off looking into using sel_ldr . More details about how sel_ldr is included in " The life of sel_ldr ". I haven't personally implemented anything that uses NaCl outside of a browser, so I can't unfortunately comment on the ease of doing so. Yes. The standalone build of Native Client contains a program called "sel_ldr" which runs the NaCl

Can I run Google's Native Client outside of the browser?

早过忘川 提交于 2019-11-28 21:25:35
问题 Is it possible to run Google NaCl outside of the browser as a process sandbox? 回答1: The Native Client documentation is probably a good starting point for trying to figure out how everything works. As Mark Seaborn and Bennet Yee indicate, you are probably best off looking into using sel_ldr. More details about how sel_ldr is included in "The life of sel_ldr". I haven't personally implemented anything that uses NaCl outside of a browser, so I can't unfortunately comment on the ease of doing so.