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 23 matching lines...) Expand all Loading... |
34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
35 #include "wtf/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class Frame; | 39 class Frame; |
40 class KURL; | 40 class KURL; |
41 class ExecutionContext; | 41 class ExecutionContext; |
42 class ExceptionState; | 42 class ExceptionState; |
43 | 43 |
44 class History : public ScriptWrappable, public RefCounted<History>, public DOMWi
ndowProperty { | 44 class History FINAL : public ScriptWrappable, public RefCounted<History>, public
DOMWindowProperty { |
45 public: | 45 public: |
46 static PassRefPtr<History> create(Frame* frame) { return adoptRef(new Histor
y(frame)); } | 46 static PassRefPtr<History> create(Frame* frame) { return adoptRef(new Histor
y(frame)); } |
47 | 47 |
48 unsigned length() const; | 48 unsigned length() const; |
49 SerializedScriptValue* state(); | 49 SerializedScriptValue* state(); |
50 | 50 |
51 void back(ExecutionContext*); | 51 void back(ExecutionContext*); |
52 void forward(ExecutionContext*); | 52 void forward(ExecutionContext*); |
53 void go(ExecutionContext*, int distance); | 53 void go(ExecutionContext*, int distance); |
54 | 54 |
55 bool stateChanged() const; | 55 bool stateChanged() const; |
56 bool isSameAsCurrentState(SerializedScriptValue*) const; | 56 bool isSameAsCurrentState(SerializedScriptValue*) const; |
57 | 57 |
58 void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title
, const String& url, SameDocumentNavigationSource, ExceptionState&); | 58 void stateObjectAdded(PassRefPtr<SerializedScriptValue>, const String& title
, const String& url, SameDocumentNavigationSource, ExceptionState&); |
59 | 59 |
60 private: | 60 private: |
61 explicit History(Frame*); | 61 explicit History(Frame*); |
62 | 62 |
63 KURL urlForState(const String& url); | 63 KURL urlForState(const String& url); |
64 | 64 |
65 SerializedScriptValue* stateInternal() const; | 65 SerializedScriptValue* stateInternal() const; |
66 | 66 |
67 RefPtr<SerializedScriptValue> m_lastStateObjectRequested; | 67 RefPtr<SerializedScriptValue> m_lastStateObjectRequested; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace WebCore | 70 } // namespace WebCore |
71 | 71 |
72 #endif // History_h | 72 #endif // History_h |
OLD | NEW |