OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "core/frame/DOMWindowProperty.h" | 32 #include "core/frame/DOMWindowProperty.h" |
33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class LocalFrame; | 38 class LocalFrame; |
39 class KURL; | 39 class KURL; |
40 class ExecutionContext; | 40 class ExecutionContext; |
41 class ExceptionState; | 41 class ExceptionState; |
| 42 class StateOptions; |
42 | 43 |
43 class History final : public GarbageCollectedFinalized<History>, public ScriptWr
appable, public DOMWindowProperty { | 44 class History final : public GarbageCollectedFinalized<History>, public ScriptWr
appable, public DOMWindowProperty { |
44 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(History); | 46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(History); |
46 public: | 47 public: |
47 static History* create(LocalFrame* frame) | 48 static History* create(LocalFrame* frame) |
48 { | 49 { |
49 return new History(frame); | 50 return new History(frame); |
50 } | 51 } |
51 | 52 |
52 unsigned length() const; | 53 unsigned length() const; |
53 SerializedScriptValue* state(); | 54 SerializedScriptValue* state(); |
| 55 void options(StateOptions&); |
54 | 56 |
55 void back(ExecutionContext*); | 57 void back(ExecutionContext*); |
56 void forward(ExecutionContext*); | 58 void forward(ExecutionContext*); |
57 void go(ExecutionContext*, int distance); | 59 void go(ExecutionContext*, int distance); |
58 | 60 |
59 void pushState(PassRefPtr<SerializedScriptValue> data, const String& title,
const String& url, ExceptionState& exceptionState) | 61 void pushState(PassRefPtr<SerializedScriptValue> data, const String& title,
const String& url, const StateOptions& options, ExceptionState& exceptionState) |
60 { | 62 { |
61 stateObjectAdded(data, title, url, FrameLoadTypeStandard, exceptionState
); | 63 stateObjectAdded(data, title, url, options, FrameLoadTypeStandard, excep
tionState); |
62 } | 64 } |
63 | 65 |
64 void replaceState(PassRefPtr<SerializedScriptValue> data, const String& titl
e, const String& url, ExceptionState& exceptionState) | 66 void replaceState(PassRefPtr<SerializedScriptValue> data, const String& titl
e, const String& url, const StateOptions& options, ExceptionState& exceptionStat
e) |
65 { | 67 { |
66 stateObjectAdded(data, title, url, FrameLoadTypeRedirectWithLockedBackFo
rwardList, exceptionState); | 68 stateObjectAdded(data, title, url, options, FrameLoadTypeRedirectWithLoc
kedBackForwardList, exceptionState); |
67 } | 69 } |
68 | 70 |
69 bool stateChanged() const; | 71 bool stateChanged() const; |
70 bool isSameAsCurrentState(SerializedScriptValue*) const; | 72 bool isSameAsCurrentState(SerializedScriptValue*) const; |
71 | 73 |
72 void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title
, const String& url, FrameLoadType, ExceptionState&); | 74 void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title
, const String& url, const StateOptions&, FrameLoadType, ExceptionState&); |
73 | 75 |
74 DECLARE_VIRTUAL_TRACE(); | 76 DECLARE_VIRTUAL_TRACE(); |
75 | 77 |
76 private: | 78 private: |
77 explicit History(LocalFrame*); | 79 explicit History(LocalFrame*); |
78 | 80 |
79 KURL urlForState(const String& url); | 81 KURL urlForState(const String& url); |
80 | 82 |
81 SerializedScriptValue* stateInternal() const; | 83 SerializedScriptValue* stateInternal() const; |
82 | 84 |
83 RefPtr<SerializedScriptValue> m_lastStateObjectRequested; | 85 RefPtr<SerializedScriptValue> m_lastStateObjectRequested; |
84 }; | 86 }; |
85 | 87 |
86 } // namespace blink | 88 } // namespace blink |
87 | 89 |
88 #endif // History_h | 90 #endif // History_h |
OLD | NEW |