nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Feature Request to create API like electron's win.setContentProtection()

Open errkranjan opened this issue 5 years ago • 9 comments

NWJS Version : 0.46.2 Operating System : Windows feature request: there should be some api like electron's win.setContentProtection() in NWJS. Electron has an api called win.setContentProtection, but nwjs has no similar feature.

Link of the feature: https://www.electronjs.org/docs/all#winsetcontentprotectionenable-macos-windows

errkranjan avatar Jun 09 '20 16:06 errkranjan

is this implemented?

muhamedRadwan avatar Nov 10 '21 04:11 muhamedRadwan

@rogerwang this can be closed content protection is not a thing anymore got architectural solved inside chromium got droped also from electron.

frank-dspeed avatar Oct 10 '22 04:10 frank-dspeed

https://www.electronjs.org/docs/latest/api/browser-window#winsetcontentprotectionenable-macos-windows @frank-dspeed looks like its still present in Electron

ayushmanchhabra avatar Oct 10 '22 04:10 ayushmanchhabra

funny thing it was a Mac Windows future thats why i not saw it in the chromium code under linux related ok that clears the dust thanks this is simply editing the registry and mac settings i know what to do thanks

frank-dspeed avatar Oct 11 '22 04:10 frank-dspeed

but anyway we can close this this is out of scope for NWJS as Core Project as this is Windows Mac Specific Electron software we need to make that compatible with NWJS i am currently working on future parity between NWJS Electron and Chrome it Self.

So i move the whole usefull API' parts into chromium directly and also change the complet Chromium Architecture so we can more easy do modular builds.

frank-dspeed avatar Oct 11 '22 04:10 frank-dspeed

i moved the new link from your comment to the electron parity issue. The Electron Parity Issue is the only one that matters. The new split will be relativ simple and gives us many features out of the box.

we split /content => IPC => (gtk,qt,quartz,wayland).

You can then even connect the same content frame with more then 1 window or even stream that remote

https://chromium.googlesource.com/chromium/src/+/main/mojo/README.md#FAQ

frank-dspeed avatar Oct 11 '22 04:10 frank-dspeed

moving on: Project Fugu

  • https://github.com/stealify/web-platform/components/ContentProtection/modules
  • https://github.com/stealify/web-platform/components/ContentProtection/components/macos
  • https://github.com/stealify/web-platform/components/ContentProtection/components/windows
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/modules
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/GTK
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/Qt
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/Clutter
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/SDL2
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/GLFW
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/GLEW
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/EFL
  • https://github.com/stealify/web-platform/components/ContentProtection/components/wayland/components/winit

frank-dspeed avatar Nov 05 '22 01:11 frank-dspeed

I was trying to implement this with ffi on windows using SetWindowDisplayAffinity and getting no where. I think it is because node is not considered the same process as the chromium window.

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity

The window must belong to the current process.

bluthen avatar Apr 29 '25 21:04 bluthen

I was trying to implement this with ffi on windows using SetWindowDisplayAffinity and getting no where. I think it is because node is not considered the same process as the chromium window.

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity

The window must belong to the current process.

I think once https://github.com/nwjs/nw.js/issues/7468 is implemented, this should be easy to do.

ayushmanchhabra avatar Apr 30 '25 02:04 ayushmanchhabra