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

#ifndef GalioBrowser_h
#define GalioBrowser_h

#if ENABLE(RMAI)

#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/AtomicString.h>

namespace WebCore {

class DOMWindow;
class HTMLIFrameElement;
class GalioWaferCollection;

class GalioBrowser : public RefCounted<GalioBrowser> {
public:
    enum {
        HOME = 2,
        STOP = 7,
        GOTO_URI = 3,
        BACK = 0,
        FORWARD = 1,
        PREVIOUS_WINDOW = 5,
        NEXT_WINDOW = 4,
        KILL_WINDOW = 6,
        STATE_DISABLED = 0,
        STATE_ENABLED = 1,
        STATE_HIDDEN = 2,
        STATE_ABSENT = 3,
        REFRESH_COMPLETE_FORMAT = 5,
        REFRESH_REDRAW = 0,
        REFRESH_REFORMAT = 1,
        REFRESH_RELOAD = 2,
        REFRESH_REFETCH = 3
    };

    static PassRefPtr<GalioBrowser> create(GalioWaferCollection* waferCollection);

    DOMWindow* currentView() const;
    bool shuttingDown() const;

    void reload();
    void reload( int firstArg, DOMWindow* optionalWindowArg = 0);
    void gotoURI( const String & urlArg, DOMWindow* optionalWindowArg = 0);
    void stop( DOMWindow* optionalWindowArg = 0);
    void forward( DOMWindow* optionalWindowArg = 0 );
    void back( DOMWindow* optionalWindowArg = 0 );
    int actionPossible( int actionArg, DOMWindow* optionalWindowArg = 0 );
    void killWindow( DOMWindow* optionalWindowArg = 0);
    void previousWindow( DOMWindow* optionalWindowArg = 0);
    void home( DOMWindow* optionalWindowArg = 0 );
    void nextWindow( DOMWindow* optionalWindowArg = 0);

protected:
    GalioBrowser(GalioWaferCollection* waferCollection);

private:
    HTMLIFrameElement* m_iframe;
    GalioWaferCollection* m_waferCollection;
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // GalioBrowser_h
