OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const GURL& url) override; | 72 const GURL& url) override; |
73 void SendNavigateWithTransition(int page_id, | 73 void SendNavigateWithTransition(int page_id, |
74 int nav_entry_id, | 74 int nav_entry_id, |
75 bool did_create_new_entry, | 75 bool did_create_new_entry, |
76 const GURL& url, | 76 const GURL& url, |
77 ui::PageTransition transition) override; | 77 ui::PageTransition transition) override; |
78 void SetContentsMimeType(const std::string& mime_type) override; | 78 void SetContentsMimeType(const std::string& mime_type) override; |
79 void SendBeforeUnloadACK(bool proceed) override; | 79 void SendBeforeUnloadACK(bool proceed) override; |
80 void SimulateSwapOutACK() override; | 80 void SimulateSwapOutACK() override; |
81 | 81 |
| 82 void SendNavigateWithReplacement(int page_id, |
| 83 int nav_entry_id, |
| 84 bool did_create_new_entry, |
| 85 const GURL& url); |
| 86 |
82 using ModificationCallback = | 87 using ModificationCallback = |
83 base::Callback<void(FrameHostMsg_DidCommitProvisionalLoad_Params*)>; | 88 base::Callback<void(FrameHostMsg_DidCommitProvisionalLoad_Params*)>; |
84 | 89 |
85 void SendNavigateWithModificationCallback( | 90 void SendNavigateWithModificationCallback( |
86 int page_id, | 91 int page_id, |
87 int nav_entry_id, | 92 int nav_entry_id, |
88 bool did_create_new_entry, | 93 bool did_create_new_entry, |
89 const GURL& url, | 94 const GURL& url, |
90 const ModificationCallback& callback); | 95 const ModificationCallback& callback); |
91 void SendNavigateWithParams( | 96 void SendNavigateWithParams( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void PrepareForCommitWithServerRedirect(const GURL& redirect_url); | 132 void PrepareForCommitWithServerRedirect(const GURL& redirect_url); |
128 | 133 |
129 // PlzNavigate | 134 // PlzNavigate |
130 void set_pending_commit(bool pending) { pending_commit_ = pending; } | 135 void set_pending_commit(bool pending) { pending_commit_ = pending; } |
131 bool pending_commit() const { return pending_commit_; } | 136 bool pending_commit() const { return pending_commit_; } |
132 | 137 |
133 private: | 138 private: |
134 void SendNavigateWithParameters(int page_id, | 139 void SendNavigateWithParameters(int page_id, |
135 int nav_entry_id, | 140 int nav_entry_id, |
136 bool did_create_new_entry, | 141 bool did_create_new_entry, |
| 142 bool should_replace_entry, |
137 const GURL& url, | 143 const GURL& url, |
138 ui::PageTransition transition, | 144 ui::PageTransition transition, |
139 int response_code, | 145 int response_code, |
140 const ModificationCallback& callback); | 146 const ModificationCallback& callback); |
141 | 147 |
142 // Computes the page ID for a pending navigation in this RenderFrameHost; | 148 // Computes the page ID for a pending navigation in this RenderFrameHost; |
143 int32_t ComputeNextPageID(); | 149 int32_t ComputeNextPageID(); |
144 | 150 |
145 TestRenderFrameHostCreationObserver child_creation_observer_; | 151 TestRenderFrameHostCreationObserver child_creation_observer_; |
146 | 152 |
147 std::string contents_mime_type_; | 153 std::string contents_mime_type_; |
148 | 154 |
149 // See set_simulate_history_list_was_cleared() above. | 155 // See set_simulate_history_list_was_cleared() above. |
150 bool simulate_history_list_was_cleared_; | 156 bool simulate_history_list_was_cleared_; |
151 | 157 |
152 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 158 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
153 }; | 159 }; |
154 | 160 |
155 } // namespace content | 161 } // namespace content |
156 | 162 |
157 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 163 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |