#ifndef InjectedScriptCanvasModule_h
#define InjectedScriptCanvasModule_h
#include "bindings/v8/ScriptState.h"
#include "core/inspector/InjectedScriptModule.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
class InjectedScriptManager;
class ScriptObject;
class InjectedScriptCanvasModule FINAL : public InjectedScriptModule {
public:
InjectedScriptCanvasModule();
virtual String source() const OVERRIDE;
static InjectedScriptCanvasModule moduleForState(InjectedScriptManager*, ScriptState*);
ScriptObject wrapCanvas2DContext(const ScriptObject&);
ScriptObject wrapWebGLContext(const ScriptObject&);
void markFrameEnd();
void captureFrame(ErrorString*, TypeBuilder::Canvas::TraceLogId*);
void startCapturing(ErrorString*, TypeBuilder::Canvas::TraceLogId*);
void stopCapturing(ErrorString*, const TypeBuilder::Canvas::TraceLogId&);
void dropTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&);
void traceLog(ErrorString*, const String&, const int*, const int*, RefPtr<TypeBuilder::Canvas::TraceLog>*);
void replayTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, int, RefPtr<TypeBuilder::Canvas::ResourceState>*, double*);
void resourceState(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, const TypeBuilder::Canvas::ResourceId&, RefPtr<TypeBuilder::Canvas::ResourceState>*);
void evaluateTraceLogCallArgument(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, int, int, const String&, RefPtr<TypeBuilder::Runtime::RemoteObject>*, RefPtr<TypeBuilder::Canvas::ResourceState>*);
private:
ScriptObject callWrapContextFunction(const String&, const ScriptObject&);
void callStartCapturingFunction(const String&, ErrorString*, String*);
void callVoidFunctionWithTraceLogIdArgument(const String&, ErrorString*, const String&);
};
}
#endif