| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /* | 5 /* |
| 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 8 * (http://www.torchmobile.com/) | 8 * (http://www.torchmobile.com/) |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // HistoryNode 2_0 (WebHistoryItem C (url: bar.com)) *REUSED* | 102 // HistoryNode 2_0 (WebHistoryItem C (url: bar.com)) *REUSED* |
| 103 // HistoryNode 2_1: (WebHistoryItem G (url: bar.com/e)) | 103 // HistoryNode 2_1: (WebHistoryItem G (url: bar.com/e)) |
| 104 // HistoryNode 2_3: (WebHistoryItem H (url: bar.com/f)) | 104 // HistoryNode 2_3: (WebHistoryItem H (url: bar.com/f)) |
| 105 // HistoryNode 2_2: (WebHistoryItem E (url: bar.com/c)) *REUSED* | 105 // HistoryNode 2_2: (WebHistoryItem E (url: bar.com/c)) *REUSED* |
| 106 // | 106 // |
| 107 class CONTENT_EXPORT HistoryController { | 107 class CONTENT_EXPORT HistoryController { |
| 108 public: | 108 public: |
| 109 explicit HistoryController(RenderViewImpl* render_view); | 109 explicit HistoryController(RenderViewImpl* render_view); |
| 110 ~HistoryController(); | 110 ~HistoryController(); |
| 111 | 111 |
| 112 void GoToEntry(scoped_ptr<HistoryEntry> entry, | |
| 113 blink::WebURLRequest::CachePolicy cache_policy); | |
| 114 | |
| 115 void UpdateForCommit(RenderFrameImpl* frame, | 112 void UpdateForCommit(RenderFrameImpl* frame, |
| 116 const blink::WebHistoryItem& item, | 113 const blink::WebHistoryItem& item, |
| 117 blink::WebHistoryCommitType commit_type, | 114 blink::WebHistoryCommitType commit_type, |
| 118 bool navigation_within_page); | 115 bool navigation_within_page); |
| 119 | 116 |
| 120 HistoryEntry* GetCurrentEntry(); | 117 HistoryEntry* GetCurrentEntry(); |
| 121 blink::WebHistoryItem GetItemForNewChildFrame(RenderFrameImpl* frame) const; | 118 blink::WebHistoryItem GetItemForNewChildFrame(RenderFrameImpl* frame) const; |
| 122 void RemoveChildrenForRedirect(RenderFrameImpl* frame); | 119 void RemoveChildrenForRedirect(RenderFrameImpl* frame); |
| 123 | 120 |
| 124 private: | 121 private: |
| 125 typedef std::vector<std::pair<blink::WebFrame*, blink::WebHistoryItem> > | 122 typedef std::vector<std::pair<blink::WebFrame*, blink::WebHistoryItem> > |
| 126 HistoryFrameLoadVector; | 123 HistoryFrameLoadVector; |
| 127 void RecursiveGoToEntry(blink::WebFrame* frame, | |
| 128 HistoryFrameLoadVector& sameDocumentLoads, | |
| 129 HistoryFrameLoadVector& differentDocumentLoads); | |
| 130 | 124 |
| 131 void UpdateForInitialLoadInChildFrame(RenderFrameImpl* frame, | 125 void UpdateForInitialLoadInChildFrame(RenderFrameImpl* frame, |
| 132 const blink::WebHistoryItem& item); | 126 const blink::WebHistoryItem& item); |
| 133 void CreateNewBackForwardItem(RenderFrameImpl* frame, | 127 void CreateNewBackForwardItem(RenderFrameImpl* frame, |
| 134 const blink::WebHistoryItem& item, | 128 const blink::WebHistoryItem& item, |
| 135 bool clone_children_of_target); | 129 bool clone_children_of_target); |
| 136 | 130 |
| 137 RenderViewImpl* render_view_; | 131 RenderViewImpl* render_view_; |
| 138 | 132 |
| 139 scoped_ptr<HistoryEntry> current_entry_; | 133 scoped_ptr<HistoryEntry> current_entry_; |
| 140 scoped_ptr<HistoryEntry> provisional_entry_; | 134 scoped_ptr<HistoryEntry> provisional_entry_; |
| 141 | 135 |
| 142 DISALLOW_COPY_AND_ASSIGN(HistoryController); | 136 DISALLOW_COPY_AND_ASSIGN(HistoryController); |
| 143 }; | 137 }; |
| 144 | 138 |
| 145 } // namespace content | 139 } // namespace content |
| 146 | 140 |
| 147 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_ | 141 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_ |
| OLD | NEW |