| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2  * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 
| 3  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
     orchmobile.com/) | 3  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
     orchmobile.com/) | 
| 4  * | 4  * | 
| 5  * Redistribution and use in source and binary forms, with or without | 5  * Redistribution and use in source and binary forms, with or without | 
| 6  * modification, are permitted provided that the following conditions | 6  * modification, are permitted provided that the following conditions | 
| 7  * are met: | 7  * are met: | 
| 8  * | 8  * | 
| 9  * 1.  Redistributions of source code must retain the above copyright | 9  * 1.  Redistributions of source code must retain the above copyright | 
| 10  *     notice, this list of conditions and the following disclaimer. | 10  *     notice, this list of conditions and the following disclaimer. | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 33 #include "core/history/HistoryItem.h" | 33 #include "core/history/HistoryItem.h" | 
| 34 #include "core/loader/FrameLoaderTypes.h" | 34 #include "core/loader/FrameLoaderTypes.h" | 
| 35 #include "wtf/Noncopyable.h" | 35 #include "wtf/Noncopyable.h" | 
| 36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" | 
| 37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" | 
| 38 | 38 | 
| 39 namespace WebCore { | 39 namespace WebCore { | 
| 40 | 40 | 
| 41 class Frame; | 41 class Frame; | 
| 42 class SerializedScriptValue; | 42 class SerializedScriptValue; | 
| 43 class StringWithDirection; |  | 
| 44 | 43 | 
| 45 class HistoryController { | 44 class HistoryController { | 
| 46     WTF_MAKE_NONCOPYABLE(HistoryController); | 45     WTF_MAKE_NONCOPYABLE(HistoryController); | 
| 47 public: | 46 public: | 
| 48     explicit HistoryController(Frame*); | 47     explicit HistoryController(Frame*); | 
| 49     ~HistoryController(); | 48     ~HistoryController(); | 
| 50 | 49 | 
| 51     void saveScrollPositionAndViewStateToItem(HistoryItem*); | 50     void saveScrollPositionAndViewStateToItem(HistoryItem*); | 
| 52     void clearScrollPositionAndViewState(); | 51     void clearScrollPositionAndViewState(); | 
| 53     void restoreScrollPositionAndViewState(); | 52     void restoreScrollPositionAndViewState(); | 
| 54 | 53 | 
| 55     void updateBackForwardListForFragmentScroll(); | 54     void updateBackForwardListForFragmentScroll(); | 
| 56 | 55 | 
| 57     void saveDocumentState(); | 56     void saveDocumentState(); | 
| 58     void saveDocumentAndScrollState(); | 57     void saveDocumentAndScrollState(); | 
| 59     void restoreDocumentState(); | 58     void restoreDocumentState(); | 
| 60 | 59 | 
| 61     void updateForCommit(); | 60     void updateForCommit(); | 
| 62     void updateForSameDocumentNavigation(); | 61     void updateForSameDocumentNavigation(); | 
| 63 | 62 | 
| 64     HistoryItem* currentItem() const { return m_currentItem.get(); } | 63     HistoryItem* currentItem() const { return m_currentItem.get(); } | 
| 65     void setCurrentItem(HistoryItem*); | 64     void setCurrentItem(HistoryItem*); | 
| 66     void setCurrentItemTitle(const StringWithDirection&); | 65     void setCurrentItemTitle(const String&); | 
| 67     bool currentItemShouldBeReplaced() const; | 66     bool currentItemShouldBeReplaced() const; | 
| 68 | 67 | 
| 69     HistoryItem* previousItem() const { return m_previousItem.get(); } | 68     HistoryItem* previousItem() const { return m_previousItem.get(); } | 
| 70 | 69 | 
| 71     HistoryItem* provisionalItem() const { return m_provisionalItem.get(); } | 70     HistoryItem* provisionalItem() const { return m_provisionalItem.get(); } | 
| 72     void setProvisionalItem(HistoryItem*); | 71     void setProvisionalItem(HistoryItem*); | 
| 73 | 72 | 
| 74     void pushState(PassRefPtr<SerializedScriptValue>, const String& title, const
      String& url); | 73     void pushState(PassRefPtr<SerializedScriptValue>, const String& title, const
      String& url); | 
| 75     void replaceState(PassRefPtr<SerializedScriptValue>, const String& title, co
     nst String& url); | 74     void replaceState(PassRefPtr<SerializedScriptValue>, const String& title, co
     nst String& url); | 
| 76 | 75 | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
| 107     RefPtr<HistoryItem> m_previousItem; | 106     RefPtr<HistoryItem> m_previousItem; | 
| 108     RefPtr<HistoryItem> m_provisionalItem; | 107     RefPtr<HistoryItem> m_provisionalItem; | 
| 109 | 108 | 
| 110     bool m_defersLoading; | 109     bool m_defersLoading; | 
| 111     RefPtr<HistoryItem> m_deferredItem; | 110     RefPtr<HistoryItem> m_deferredItem; | 
| 112 }; | 111 }; | 
| 113 | 112 | 
| 114 } // namespace WebCore | 113 } // namespace WebCore | 
| 115 | 114 | 
| 116 #endif // HistoryController_h | 115 #endif // HistoryController_h | 
| OLD | NEW | 
|---|