/** @file GalioBrowser.cpp
 *
 * Copyright (C) Espial Limited 2014 - Company confidential - All rights reserved.
 *
 */

#include "config.h"

#if ENABLE(RMAI)

#include "GalioBrowser.h"
#include "GalioWaferCollection.h"

#include "DOMWindow.h"
#include "Document.h"
#include "HTMLIFrameElement.h"
#include "Frame.h"

extern "C" {
#include "layers.h"
}

namespace WebCore {

PassRefPtr<GalioBrowser> GalioBrowser::create(GalioWaferCollection* waferCollection)
{
    return adoptRef(new GalioBrowser(waferCollection));
}

GalioBrowser::GalioBrowser(GalioWaferCollection* waferCollection)
    : m_waferCollection(waferCollection)
{
    m_iframe = static_cast<HTMLIFrameElement*>(waferCollection->frame()->document()->getElementById(String("browser")));
}

DOMWindow* GalioBrowser::currentView() const
{
    return m_iframe->contentWindow();
}

bool GalioBrowser::shuttingDown() const
{
    return false;
}

void GalioBrowser::reload()
{
	reload(0);
}

void GalioBrowser::reload( int firstArg, DOMWindow* )
{
}

void GalioBrowser::gotoURI( const String & urlArg, DOMWindow* )
{
    m_iframe->setLocation(urlArg);
}

void GalioBrowser::stop( DOMWindow* )
{
}

void GalioBrowser::forward( DOMWindow* )
{
}

void GalioBrowser::back( DOMWindow* )
{
}

int GalioBrowser::actionPossible( int actionArg, DOMWindow* )
{
    return 0;
}

void GalioBrowser::killWindow( DOMWindow* )
{
}

void GalioBrowser::previousWindow( DOMWindow* )
{
}

void GalioBrowser::home( DOMWindow* )
{
}

void GalioBrowser::nextWindow( DOMWindow* )
{
}

} // namespace WebCore

#endif // ENABLE(RMAI)
