| 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 28 matching lines...) Expand all Loading... |
| 39 #include "base/memory/scoped_ptr.h" | 39 #include "base/memory/scoped_ptr.h" |
| 40 #include "base/memory/scoped_vector.h" | 40 #include "base/memory/scoped_vector.h" |
| 41 #include "content/common/content_export.h" | 41 #include "content/common/content_export.h" |
| 42 #include "content/renderer/history_entry.h" | 42 #include "content/renderer/history_entry.h" |
| 43 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 43 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 44 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 44 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 45 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 45 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 class WebFrame; | 48 class WebFrame; |
| 49 class WebLocalFrame; |
| 49 } | 50 } |
| 50 | 51 |
| 51 namespace content { | 52 namespace content { |
| 52 class RenderFrameImpl; | 53 class RenderFrameImpl; |
| 53 class RenderViewImpl; | 54 class RenderViewImpl; |
| 54 struct NavigationParams; | 55 struct NavigationParams; |
| 55 | 56 |
| 56 // A guide to history state in the renderer: | 57 // A guide to history state in the renderer: |
| 57 // | 58 // |
| 58 // HistoryController: Owned by RenderView, is the entry point for interacting | 59 // HistoryController: Owned by RenderView, is the entry point for interacting |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // | 108 // |
| 108 class CONTENT_EXPORT HistoryController { | 109 class CONTENT_EXPORT HistoryController { |
| 109 public: | 110 public: |
| 110 explicit HistoryController(RenderViewImpl* render_view); | 111 explicit HistoryController(RenderViewImpl* render_view); |
| 111 ~HistoryController(); | 112 ~HistoryController(); |
| 112 | 113 |
| 113 void set_provisional_entry(scoped_ptr<HistoryEntry> entry) { | 114 void set_provisional_entry(scoped_ptr<HistoryEntry> entry) { |
| 114 provisional_entry_ = entry.Pass(); | 115 provisional_entry_ = entry.Pass(); |
| 115 } | 116 } |
| 116 | 117 |
| 117 void GoToEntry(scoped_ptr<HistoryEntry> entry, | 118 void GoToEntry(blink::WebLocalFrame* main_frame, |
| 119 scoped_ptr<HistoryEntry> entry, |
| 118 scoped_ptr<NavigationParams> navigation_params, | 120 scoped_ptr<NavigationParams> navigation_params, |
| 119 blink::WebURLRequest::CachePolicy cache_policy); | 121 blink::WebURLRequest::CachePolicy cache_policy); |
| 120 | 122 |
| 121 void UpdateForCommit(RenderFrameImpl* frame, | 123 void UpdateForCommit(RenderFrameImpl* frame, |
| 122 const blink::WebHistoryItem& item, | 124 const blink::WebHistoryItem& item, |
| 123 blink::WebHistoryCommitType commit_type, | 125 blink::WebHistoryCommitType commit_type, |
| 124 bool navigation_within_page); | 126 bool navigation_within_page); |
| 125 | 127 |
| 126 HistoryEntry* GetCurrentEntry(); | 128 HistoryEntry* GetCurrentEntry(); |
| 127 blink::WebHistoryItem GetItemForNewChildFrame(RenderFrameImpl* frame) const; | 129 blink::WebHistoryItem GetItemForNewChildFrame(RenderFrameImpl* frame) const; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 153 // passed into frames created after the commit that resulted from the | 155 // passed into frames created after the commit that resulted from the |
| 154 // navigation in GetItemForNewChildFrame(). | 156 // navigation in GetItemForNewChildFrame(). |
| 155 scoped_ptr<NavigationParams> navigation_params_; | 157 scoped_ptr<NavigationParams> navigation_params_; |
| 156 | 158 |
| 157 DISALLOW_COPY_AND_ASSIGN(HistoryController); | 159 DISALLOW_COPY_AND_ASSIGN(HistoryController); |
| 158 }; | 160 }; |
| 159 | 161 |
| 160 } // namespace content | 162 } // namespace content |
| 161 | 163 |
| 162 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_ | 164 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_ |
| OLD | NEW |