}
@Override
protected AnchorableFrame createFrame(String url)
{
AnchorableFrame frame = new AnchorableFrame();
// allow full screen
Element el = frame.getElement();
el.setAttribute("webkitallowfullscreen", "");
el.setAttribute("mozallowfullscreen", "");
el.setAttribute("allowfullscreen", "");
frame.navigate(url);
final Operation initSlides = new Operation()
{
@Override
public void execute()
{
if (getNavigationMenu().isVisible())
{
fireSlideIndexChanged();
slideChangeMonitor_.scheduleRepeating(100);
}
}
};
if (isShiny_)
{
shinyFrame_.initialize(url, new Operation()
{
@Override
public void execute()
{
shinyFrame_.setScrollPosition(scrollPosition_);
initSlides.execute();
}
});
}
else
{
// poll for document availability then perform initialization
// tasks once it's available (addLoadHandler wasn't always
// getting called at least under Cocoa WebKit)
Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
@Override
public boolean execute()
{
// see if the document is ready
AnchorableFrame frame = getFrame();
if (frame == null)
return true;
IFrameElementEx iframe = frame.getIFrame();
if (iframe == null)
return true;
Document doc = iframe.getContentDocument();
if (doc == null)