Index: Source/WebCore/inspector/ScriptArguments.h |
diff --git a/Source/WebCore/inspector/ScriptArguments.h b/Source/WebCore/inspector/ScriptArguments.h |
index 26549b6d30b737fd43b0cbc043a56e8b78154aa9..3993191583239ada33739e6572c05d13ef3f5f4d 100644 |
--- a/Source/WebCore/inspector/ScriptArguments.h |
+++ b/Source/WebCore/inspector/ScriptArguments.h |
@@ -31,32 +31,57 @@ |
#ifndef ScriptArguments_h |
#define ScriptArguments_h |
-#include "PlatformString.h" |
#include "ScriptState.h" |
+#include "PlatformString.h" |
+ |
#include <wtf/Forward.h> |
#include <wtf/RefCounted.h> |
#include <wtf/Vector.h> |
namespace WebCore { |
+class DOMWindow; |
+class InspectorArray; |
+class InjectedScriptManager; |
class ScriptValue; |
+// FIXME: consider renaming to ConsoleArguments. |
class ScriptArguments : public RefCounted<ScriptArguments> { |
+ WTF_MAKE_NONCOPYABLE(ScriptArguments); |
+public: |
+ ScriptArguments() {}; |
+ virtual ~ScriptArguments() {} |
+ |
+ virtual PassRefPtr<InspectorArray> wrap(InjectedScriptManager*) const = 0; |
+ virtual DOMWindow* domWindow() const = 0; |
+ |
+ virtual bool argumentGetString(size_t, String&) const = 0; |
+ virtual bool argumentToString(size_t, String&) const = 0; |
+ |
+ virtual bool isEqual(ScriptArguments*) const = 0; |
+ |
+ virtual ScriptValue argumentAt(size_t) const = 0; |
+ virtual size_t argumentCount() const = 0; |
+}; |
+ |
+class JavaScriptArguments : public ScriptArguments { |
public: |
- static PassRefPtr<ScriptArguments> create(ScriptState*, Vector<ScriptValue>& arguments); |
+ static PassRefPtr<JavaScriptArguments> create(ScriptState*, Vector<ScriptValue>& arguments); |
+ virtual ~JavaScriptArguments(); |
- ~ScriptArguments(); |
+ virtual PassRefPtr<InspectorArray> wrap(InjectedScriptManager*) const; |
+ virtual DOMWindow* domWindow() const; |
- const ScriptValue& argumentAt(size_t) const; |
- size_t argumentCount() const { return m_arguments.size(); } |
+ virtual bool argumentGetString(size_t, String&) const; |
+ virtual bool argumentToString(size_t, String&) const; |
- ScriptState* globalState() const; |
+ virtual bool isEqual(ScriptArguments*) const; |
- bool getFirstArgumentAsString(WTF::String& result, bool checkForNullOrUndefined = false); |
- bool isEqual(ScriptArguments*) const; |
+ virtual ScriptValue argumentAt(size_t) const; |
+ virtual size_t argumentCount() const { return m_arguments.size(); } |
private: |
- ScriptArguments(ScriptState*, Vector<ScriptValue>& arguments); |
+ JavaScriptArguments(ScriptState*, Vector<ScriptValue>& arguments); |
ScriptStateProtectedPtr m_scriptState; |
Vector<ScriptValue> m_arguments; |