Question

I would like to trick Chrome in to rendering its tabs in some memory device context of mine. Is this possible at all ? Thank you !

Was it helpful?

Solution

There's a method in chrome.tabs called captureVisibleTab. What you get back is either a PNG or JPEG.

http://code.google.com/chrome/extensions/tabs.html

That API is available to Chrome extensions - but you can't call it from ordinary JavaScript in an unextended browser. I presume this is the technique used by "Aviary Screen Capture".

If you have a C++ program running in its own process, and you want to "poke into" Chrome - there are a lot of dodgy ways to do window hooks and capturing. But why not save yourself the trouble? Chrome is based on WebKit - just use WebKit directly. Qt makes it super easy, for instance:

http://doc.qt.nokia.com/4.6/examples-webkit.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top