How to use NPAPI / ActiveX plugins in Chrome 45+

4,140 views
Skip to first unread message

Martin Mravec

unread,
Aug 16, 2015, 5:13:09 AM8/16/15
to Chromium-dev
Hi,
I know, in September, Chrome will remove support for NPAPI. But when i check Chrome extension IE Tab (https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd) in Chrome 45 or 46, plugins like Java or Unity are still working.

How it is described here - http://stackoverflow.com/questions/30391863/can-i-embed-program-through-native-messaging-in-chrome-like-old-npapi-plugins#answer-30402579 , they probably use HWND and Native messaging to find Chrome process for tab and then inject "IE engine" to the tab, which can run ActiveX plugins.

I would like to know, how is that possible ? There are not any APIs to do this or I did not find it.

Can somebody explain how reproduce this hack (or whatever it is) ?

It will be supported by Chrome in the future ? If Google does not like old NPAPI, this is probably something they do not want too.

Victor Khimenko

unread,
Aug 16, 2015, 6:28:39 AM8/16/15
to marty...@gmail.com, Chromium-dev
On Sun, Aug 16, 2015 at 12:13 PM, Martin Mravec <marty...@gmail.com> wrote:
Hi,
I know, in September, Chrome will remove support for NPAPI. But when i check Chrome extension IE Tab (https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd) in Chrome 45 or 46, plugins like Java or Unity are still working.

How it is described here - http://stackoverflow.com/questions/30391863/can-i-embed-program-through-native-messaging-in-chrome-like-old-npapi-plugins#answer-30402579 , they probably use HWND and Native messaging to find Chrome process for tab and then inject "IE engine" to the tab, which can run ActiveX plugins.

I would like to know, how is that possible ? There are not any APIs to do this or I did not find it.

Can somebody explain how reproduce this hack (or whatever it is) ?

You'll need to ask extension authors.
 
It will be supported by Chrome in the future ? If Google does not like old NPAPI, this is probably something they do not want too.

Most definitely not. Separate HWNDs in the middle of page were emulated specifically for NPAPI. They (and many other things) are going away. Google is not declaring war on the extensions like the one described above, but if their current tricks will break when NPAPI legacy will be removed from the codebase they'll need to find a new way to do their tricks.

This bing said their model "we'll replace the whole rendering engine of a tab and will do that only on Windows" trick is much easier to support than the full NPAPI model, thus there's chance that they will be able to keep it going. It's not supported, obviously, but it could continue to work if they are persistend enough.

PhistucK

unread,
Aug 16, 2015, 6:44:18 AM8/16/15
to Victor Khimenko, marty...@gmail.com, Chromium-dev
They are not using NPAPI, or PPAPI. And since you can see glitches -
- When you click on a tab, it takes a fraction of a second before the Internet Explorer control is shown.
- If the Chrome Developer Tools feature is open for that tab, the Internet Explorer control is shown in the wrong place.
Those glitches makes me think they are simply showing their own chrome-less window (they ask you to install their own separate, external binary when you install the extension) on top of Chrome, using the position reported by the various DOM members (passed to them using native messaging).


PhistucK

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Martin Mravec

unread,
Aug 16, 2015, 11:22:30 AM8/16/15
to Chromium-dev, marty...@gmail.com
"we'll replace the whole rendering engine of a tab and will do that only on Windows"

Hi,
I can not find this information, can you send me a link to source...thanks

Dňa nedeľa, 16. augusta 2015 12:28:39 UTC+2 khim napísal(-a):

Martin Mravec

unread,
Aug 16, 2015, 11:22:59 AM8/16/15
to Chromium-dev, kh...@chromium.org, marty...@gmail.com
Hi,
when I killed IE tab process in task manager, tab in Chrome was still working, only ie tab disappeared. So I think, you have right.
If they replaced the whole rendering engine of tab, I think, that tab would be have a problem with that when I killed IE tab process.

also they have function in extension to resize IE:
handleResize: function() {
        window
.setTimeout(function() {
           
var msgResize = {
                type
: 'RESIZE',
                innerWidth
: this.getIEWidth(),
                innerHeight
: this.getIEHeight()
           
};
           
NativeHost.postMessage(msgResize);
       
}.bind(this), this.RESIZE_DELAY);
   
}


Dňa nedeľa, 16. augusta 2015 12:44:18 UTC+2 PhistucK napísal(-a):
Reply all
Reply to author
Forward
0 new messages