#ifndef ConsoleClient_h
#define ConsoleClient_h
#include "ConsoleTypes.h"
#include <wtf/Forward.h>
namespace Inspector {
class ScriptArguments;
}
namespace JSC {
class ExecState;
class ConsoleClient {
public:
virtual ~ConsoleClient() { }
JS_EXPORT_PRIVATE static void printConsoleMessage(MessageSource, MessageType, MessageLevel, const String& message, const String& url, unsigned lineNumber, unsigned columnNumber);
JS_EXPORT_PRIVATE static void printConsoleMessageWithArguments(MessageSource, MessageType, MessageLevel, JSC::ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void logWithLevel(ExecState*, RefPtr<Inspector::ScriptArguments>&&, MessageLevel);
void clear(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void dir(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void dirXML(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void table(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void trace(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void assertCondition(ExecState*, RefPtr<Inspector::ScriptArguments>&&, bool condition);
void group(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void groupCollapsed(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
void groupEnd(ExecState*, RefPtr<Inspector::ScriptArguments>&&);
virtual void messageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, RefPtr<Inspector::ScriptArguments>&&) = 0;
virtual void count(ExecState*, RefPtr<Inspector::ScriptArguments>&&) = 0;
virtual void profile(ExecState*, const String& title) = 0;
virtual void profileEnd(ExecState*, const String& title) = 0;
virtual void time(ExecState*, const String& title) = 0;
virtual void timeEnd(ExecState*, const String& title) = 0;
virtual void timeStamp(ExecState*, RefPtr<Inspector::ScriptArguments>&&) = 0;
private:
enum ArgumentRequirement { ArgumentRequired, ArgumentNotRequired };
void internalMessageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, RefPtr<Inspector::ScriptArguments>&&, ArgumentRequirement);
};
}
#endif // ConsoleClient_h