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 !
+2
A:
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:
Hostile Fork
2010-05-17 07:57:53
Sounds good. Some of the webpages will have Flash content, I guess Webkit will not be able to render the Flash content too ?
sevaxx
2010-05-17 08:04:42
As is generally true with the plugin that starts with F and rhymes with "Crash"... your mileage may vary. But support was added in Qt 4.5+. http://www.qtcentre.org/threads/27882-QtWebKit-and-flash-performance-issues
Hostile Fork
2010-05-17 08:11:21
There are some hooky things for each webkit container. Look in this directory and you can see how everything (qt, wxwidgets, chromium, etc.) has a little bit of code stuck in to WebKit to get it going: http://trac.webkit.org/browser/trunk/WebCore/plugins
Hostile Fork
2010-05-17 08:23:40