#ifndef Console_h
#define Console_h
#include "DOMWindowProperty.h"
#include "ScriptProfile.h"
#include "ScriptState.h"
#include "ScriptWrappable.h"
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class Frame;
class Page;
class ScriptArguments;
#if ENABLE(JAVASCRIPT_DEBUGGER)
typedef Vector<RefPtr<ScriptProfile> > ProfilesArray;
#endif
class Console : public ScriptWrappable, public RefCounted<Console>, public DOMWindowProperty {
public:
static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Console(frame)); }
virtual ~Console();
void debug(ScriptState*, PassRefPtr<ScriptArguments>);
void error(ScriptState*, PassRefPtr<ScriptArguments>);
void info(ScriptState*, PassRefPtr<ScriptArguments>);
void log(ScriptState*, PassRefPtr<ScriptArguments>);
void clear(ScriptState*, PassRefPtr<ScriptArguments>);
void warn(ScriptState*, PassRefPtr<ScriptArguments>);
void dir(ScriptState*, PassRefPtr<ScriptArguments>);
void dirxml(ScriptState*, PassRefPtr<ScriptArguments>);
void table(ScriptState*, PassRefPtr<ScriptArguments>);
void trace(ScriptState*, PassRefPtr<ScriptArguments>);
void assertCondition(ScriptState*, PassRefPtr<ScriptArguments>, bool condition);
void count(ScriptState*, PassRefPtr<ScriptArguments>);
#if ENABLE(JAVASCRIPT_DEBUGGER)
const ProfilesArray& profiles() const { return m_profiles; }
void profile(const String&, ScriptState*);
void profileEnd(const String&, ScriptState*);
#endif
void time(const String&);
void timeEnd(ScriptState*, const String&);
void timeStamp(PassRefPtr<ScriptArguments>);
void group(ScriptState*, PassRefPtr<ScriptArguments>);
void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>);
void groupEnd();
private:
inline Page* page() const;
explicit Console(Frame*);
#if ENABLE(JAVASCRIPT_DEBUGGER)
ProfilesArray m_profiles;
#endif
};
}
#endif // Console_h