#ifndef History_h
#define History_h
-#include "bindings/v8/ScriptWrappable.h"
-#include "bindings/v8/SerializedScriptValue.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/core/v8/SerializedScriptValue.h"
#include "core/loader/FrameLoaderTypes.h"
#include "core/frame/DOMWindowProperty.h"
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
-namespace WebCore {
+namespace blink {
-class Frame;
+class LocalFrame;
class KURL;
class ExecutionContext;
class ExceptionState;
-class History FINAL : public ScriptWrappable, public RefCounted<History>, public DOMWindowProperty {
+class History final : public RefCountedWillBeGarbageCollectedFinalized<History>, public ScriptWrappable, public DOMWindowProperty {
+ DEFINE_WRAPPERTYPEINFO();
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(History);
public:
- static PassRefPtr<History> create(Frame* frame) { return adoptRef(new History(frame)); }
+ static PassRefPtrWillBeRawPtr<History> create(LocalFrame* frame)
+ {
+ return adoptRefWillBeNoop(new History(frame));
+ }
unsigned length() const;
SerializedScriptValue* state();
bool stateChanged() const;
bool isSameAsCurrentState(SerializedScriptValue*) const;
- void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title, const String& url, UpdateBackForwardListPolicy, ExceptionState&);
+ void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title, const String& url, FrameLoadType, ExceptionState&);
+
+ virtual void trace(Visitor*) override;
private:
- explicit History(Frame*);
+ explicit History(LocalFrame*);
KURL urlForState(const String& url);
RefPtr<SerializedScriptValue> m_lastStateObjectRequested;
};
-} // namespace WebCore
+} // namespace blink
#endif // History_h