#ifndef ConsoleBase_h
#define ConsoleBase_h
#include "bindings/v8/ScriptState.h"
#include "bindings/v8/ScriptWrappable.h"
#include "core/inspector/ConsoleAPITypes.h"
#include "core/inspector/ScriptCallStack.h"
#include "core/frame/ConsoleTypes.h"
#include "core/frame/DOMWindowProperty.h"
#include "heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace WebCore {
class ScriptArguments;
class ConsoleBase : public RefCountedWillBeGarbageCollectedFinalized<ConsoleBase> {
public:
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>);
void markTimeline(const String&);
void profile(ScriptState*, const String&);
void profileEnd(ScriptState*, const String&);
void time(const String&);
void timeEnd(ScriptState*, const String&);
void timeStamp(const String&);
void timeline(ScriptState*, const String&);
void timelineEnd(ScriptState*, const String&);
void group(ScriptState*, PassRefPtr<ScriptArguments>);
void groupCollapsed(ScriptState*, PassRefPtr<ScriptArguments>);
void groupEnd();
virtual void trace(Visitor*) = 0;
virtual ~ConsoleBase();
protected:
virtual ExecutionContext* context() = 0;
virtual void reportMessageToClient(MessageLevel, const String& message, PassRefPtr<ScriptCallStack>) = 0;
private:
void internalAddMessage(MessageType, MessageLevel, ScriptState*, PassRefPtr<ScriptArguments>, bool acceptNoArguments = false, bool printTrace = false);
};
}
#endif