this is a continuation of the question (http://goo.gl/a61CG).
I'm trying to retrieve the visible size of the DOM window or document ( not sure which term is correct ) which contains the plugin. I have been studying the Firebreath's reference but I'm coming up short of an answer.
For instance inside onWindowAttached I do this:
m_host->htmlLog("Attaching window.");
FB::DOM::ElementPtr element_ptr(m_host->getDOMElement());
if( element_ptr )
{
int Width = element_ptr->getWidth();
int Height = element_ptr->getHeight();
std::stringstream ss;
ss << "width: " << Width << "; height: " << Height << std::endl;
m_host->htmlLog(ss.str());
}
FB::DOM::ElementPtr parent_element_ptr = element_ptr->getParentNode();
if( parent_element_ptr )
{
int Width = parent_element_ptr->getWidth();
int Height = parent_element_ptr->getHeight();
std::stringstream ss;
ss << "parent props: width: " << Width << "; height: " << Height << std::endl;
m_host->htmlLog(ss.str());
}
m_host->htmlLog("Finished attaching window.");
Google Chrome ( v.23 ) give me this now:
Attaching window.
width: 300; height: 300
Finished attaching window.
The 300x300 pixels refers to the size of the hmtl object which orders the browser the load the plugin.
So, what is the way to retrieve the visible area of the browser window that contains a plugin?
I'm using a recent firebreath trunk version on Windows 7 and Visual Studio 2010.
Thanks, Christian