| 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 27 matching lines...) Expand all Loading... |
| 38 class Frame; | 38 class Frame; |
| 39 class ScriptExecutionContext; | 39 class ScriptExecutionContext; |
| 40 class SerializedScriptValue; | 40 class SerializedScriptValue; |
| 41 typedef int ExceptionCode; | 41 typedef int ExceptionCode; |
| 42 | 42 |
| 43 class History : public ScriptWrappable, public RefCounted<History>, public DOMWi
ndowProperty { | 43 class History : public ScriptWrappable, public RefCounted<History>, public DOMWi
ndowProperty { |
| 44 public: | 44 public: |
| 45 static PassRefPtr<History> create(Frame* frame) { return adoptRef(new Histor
y(frame)); } | 45 static PassRefPtr<History> create(Frame* frame) { return adoptRef(new Histor
y(frame)); } |
| 46 | 46 |
| 47 unsigned length() const; | 47 unsigned length() const; |
| 48 SerializedScriptValue* state(); | 48 PassRefPtr<SerializedScriptValue> state(); |
| 49 void back(); | 49 void back(); |
| 50 void forward(); | 50 void forward(); |
| 51 void go(int distance); | 51 void go(int distance); |
| 52 | 52 |
| 53 void back(ScriptExecutionContext*); | 53 void back(ScriptExecutionContext*); |
| 54 void forward(ScriptExecutionContext*); | 54 void forward(ScriptExecutionContext*); |
| 55 void go(ScriptExecutionContext*, int distance); | 55 void go(ScriptExecutionContext*, int distance); |
| 56 | 56 |
| 57 bool stateChanged() const; | 57 bool stateChanged() const; |
| 58 bool isSameAsCurrentState(SerializedScriptValue*) const; | 58 bool isSameAsCurrentState(SerializedScriptValue*) const; |
| 59 | 59 |
| 60 enum StateObjectType { | 60 enum StateObjectType { |
| 61 StateObjectPush, | 61 StateObjectPush, |
| 62 StateObjectReplace | 62 StateObjectReplace |
| 63 }; | 63 }; |
| 64 void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title
, const String& url, StateObjectType, ExceptionCode&); | 64 void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title
, const String& url, StateObjectType, ExceptionCode&); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 explicit History(Frame*); | 67 explicit History(Frame*); |
| 68 | 68 |
| 69 KURL urlForState(const String& url); | 69 KURL urlForState(const String& url); |
| 70 | 70 |
| 71 SerializedScriptValue* stateInternal() const; | 71 PassRefPtr<SerializedScriptValue> stateInternal() const; |
| 72 | 72 |
| 73 SerializedScriptValue* m_lastStateObjectRequested; | 73 RefPtr<SerializedScriptValue> m_lastStateObjectRequested; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace WebCore | 76 } // namespace WebCore |
| 77 | 77 |
| 78 #endif // History_h | 78 #endif // History_h |
| OLD | NEW |