google-chrome-app

How to include a data file in a chrome app for a native client module to read

可紊 提交于 2019-12-06 07:32:47
If I have a chrome packaged app that also includes a PNaCl/NaCl module, is there a way to include in the packaged app some data files, which the NaCl module will then read in? I don't need to do any file writing, just to include some data files that the native module needs to make use of. The entire contents of your packaged app are available to both JavaScript and NaCl code via http requests. If you use the nacl_io library then you can also access all the files using standard POSIX file APIs by first mounting the contents of the package somewhere if your virtual filesystem: e.g: // Mount the

Chrome packaged app onblur listener?

末鹿安然 提交于 2019-12-06 06:59:14
问题 Is there any event listeners for a chrome packaged app to tell if the app has lost focus? I'm trying to make a game, but I can't seem to make it pause when I change the focus. I've tried a few different things such as the following, but none seem to work. document.onblur = pause; document.addEventListener('blur', pause, false); canvas.onblur = pause; canvas.addEventListener('blur', pause, false); window.onblur = pause; window.addEventListener('blur', pause, false); chrome.app.window.onblur =

Chrome.system.cpu API Usage

荒凉一梦 提交于 2019-12-06 06:30:48
Is it possible to use the chrome.system.cpu api to get the current CPU load? I specifically can't figure out how to convert the returned numbers to a percent of the total current load. I found this, but not quite sure how to implement: "Callers can compute load fractions by making two calls, subtracting the times, and dividing by the difference in totalTime." https://developer.chrome.com/apps/system_cpu Answer : An example of getting CPU usage is here: https://github.com/beaufortfrancois/cog-chrome-app/blob/master/src/main.js If you want to compute the load on the processor(s) -- that is, the

GWT Chrome Extension with manifest_version: 2

北城余情 提交于 2019-12-06 04:29:54
Has any one been able to make a Chrome extension using GWT and manifest_version 2? I have sandboxed all the GWT generated files also (as suggested here ) but it still does not work. manifest.json { "name": "Hello World!", "description": "My first packaged app.", "manifest_version": 2, "version": "0.1", "app": { "background": { "scripts": ["background.js"] } }, "permissions": ["experimental", "appWindow"], "icons": { "16": "calculator-16.png", "128": "calculator-128.png" } } background.js chrome.experimental.app.onLaunched.addListener(function() { chrome.appWindow.create('LocalWebApp.html', {

Communication between Chrome-app and a homepage with PostMessage

时光怂恿深爱的人放手 提交于 2019-12-06 03:33:31
问题 I need to be able to send postMessage from a Chrome App through a webview to the homepage and back. I have established PostMessage from the Chrome App to the homepage, and the PostMessage is also catched by the homepage and a new one is send back, but this PostMessage reply is not caught by the Chrome App. I can see that it is possible on the Chrome-App API.: The guest will be able to send replies to the embedder by posting message to event.source on the message event it receives. So the

How do I get the checkbox “Allow access to file URLs” to show up next to my app? I have file write permissions in manifest

时间秒杀一切 提交于 2019-12-06 02:44:37
问题 More Info/Update I packaged and installed google's own sample app showing filesystem access and it also does not show the checkbox! You can find it here: https://github.com/GoogleChrome/chrome-app-samples/tree/master/filesystem-access Original Post I have the permission asking for filesystem.write ability in my manifest but on the chrome://extensions page, the check box doesn't show up. And when I click "permissions" next to my app's icon, it only shows: "Write to files that you have opened

Using Google Maps API from Chrome App

£可爱£侵袭症+ 提交于 2019-12-06 00:56:56
问题 I'm trying to use Google maps inside of a Chrome App. Whenever I try to load the javascript I get the error: "Refused to load the script 'https://maps.googleapis.com/maps/api/js?key=Key&sensor=true' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback." I thought about trying to use a webview or a sandbox, but am having issues implementing

Chrome app window cannot be moved partially outside of screen using moveTo

不打扰是莪最后的温柔 提交于 2019-12-06 00:15:54
When a Chrome app window is moved to the edge of the screen using the mouse, the window can be moved partially outside of the screen. However when trying to move a Chrome app window beyond the screen using the moveTo function it remains snapped to the edge of the screen. Is there any other method which can be used to achieve this? Try using setBounds() instead of moveTo(), that works for me: chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('window.html', { 'bounds': { 'width': 400, 'height': 500 } }, function(appwindow) { appwindow.setBounds({left: -200, top: 200

What is the correct redirect URL for chrome.identity.launchWebAuthFlow?

ぃ、小莉子 提交于 2019-12-05 22:58:30
问题 I'd like to use the chrome.identity API in a chrome packaged app to allow the user to authenticate with github. From the app side, I'm happy with: chrome.identity.launchWebAuthFlow( {'url':'https://github.com/login/oauth/authorize?client_id=clientidgoeshere','interactive':true}, functionToTakeRedirectURL ); But I'm unsure what the redirect URL should be on the github side. When the app is live, I'll set the redirect url to https://appidgoeshere.chromiumapp.org on the github application page,

Is it possible to have a chrome packaged app that utilizes firebase?

大城市里の小女人 提交于 2019-12-05 20:09:13
I'm running into problems with CSP. I've tried adding firebase to permissions, and sandboxing. I am trying to convert this firebase sample chrome extension( https://github.com/firebase/firebase-chrome-extension ) to a chrome packaged app. The packaged app doesn't like to connect to firebase. I just keep getting security violations in the console. I was also running to the same issue. It seems " chrome packaged app " does not allow adding "content_security_policy" and re-defining the policies in manifest.json Try adding it and re-loading the app via extension manager and you should see the