Chromium Code Reviews| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 const std::vector<GURL>& redirects); | 79 const std::vector<GURL>& redirects); |
| 80 void SendNavigateWithParameters( | 80 void SendNavigateWithParameters( |
| 81 int page_id, | 81 int page_id, |
| 82 const GURL& url, | 82 const GURL& url, |
| 83 ui::PageTransition transition, | 83 ui::PageTransition transition, |
| 84 const GURL& original_request_url, | 84 const GURL& original_request_url, |
| 85 int response_code, | 85 int response_code, |
| 86 const base::FilePath* file_path_for_history_item, | 86 const base::FilePath* file_path_for_history_item, |
| 87 const std::vector<GURL>& redirects); | 87 const std::vector<GURL>& redirects); |
| 88 void SendBeginNavigationWithURL(const GURL& url, bool has_user_gesture); | 88 void SendBeginNavigationWithURL(const GURL& url, bool has_user_gesture); |
| 89 // PlzNavigate | |
|
clamy
2015/02/24 13:05:34
nit: move the comment above SendBeginNavigationWit
carlosk
2015/02/24 16:38:56
In fact I merged these two methods as they were pr
clamy
2015/02/25 14:29:49
I think the merging is good but would prefer if th
carlosk
2015/02/25 16:07:59
Done.
| |
| 90 void SendRendererInitiatedNavigationRequest(const GURL& url, | |
|
clamy
2015/02/24 13:05:34
I think there should be a comment explaining what
carlosk
2015/02/24 16:38:56
Done.
| |
| 91 bool has_user_gesture); | |
| 89 | 92 |
| 90 void DidDisownOpener(); | 93 void DidDisownOpener(); |
| 91 | 94 |
| 92 // If set, navigations will appear to have cleared the history list in the | 95 // If set, navigations will appear to have cleared the history list in the |
| 93 // RenderFrame | 96 // RenderFrame |
| 94 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). | 97 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). |
| 95 // False by default. | 98 // False by default. |
| 96 void set_simulate_history_list_was_cleared(bool cleared) { | 99 void set_simulate_history_list_was_cleared(bool cleared) { |
| 97 simulate_history_list_was_cleared_ = cleared; | 100 simulate_history_list_was_cleared_ = cleared; |
| 98 } | 101 } |
| 99 | 102 |
| 100 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to | 103 // Advances the RenderFrameHost (and through it the RenderFrameHostManager) to |
| 101 // a state where a new navigation can be committed by a renderer. Currently, | 104 // a state where a new navigation can be committed by a renderer. Currently, |
| 102 // this simulates a BeforeUnload ACK from the renderer. | 105 // this simulates a BeforeUnload ACK from the renderer. |
| 103 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the | 106 // PlzNavigate: this simulates a BeforeUnload ACK from the renderer, and the |
| 104 // interaction with the IO thread up until the response is ready to commit. | 107 // interaction with the IO thread up until the response is ready to commit. |
| 105 void PrepareForCommit(const GURL& url); | 108 void PrepareForCommit(); |
| 106 | 109 |
| 107 // Simulate receiving a FrameHostMsg_BeforeUnloadHandlersPresent. | 110 // Simulate receiving a FrameHostMsg_BeforeUnloadHandlersPresent. |
| 108 void SendBeforeUnloadHandlersPresent(bool present); | 111 void SendBeforeUnloadHandlersPresent(bool present); |
| 109 | 112 |
| 110 // Simulate receiving a FrameHostMsg_UnloadHandlersPresent. | 113 // Simulate receiving a FrameHostMsg_UnloadHandlersPresent. |
| 111 void SendUnloadHandlersPresent(bool present); | 114 void SendUnloadHandlersPresent(bool present); |
| 112 | 115 |
| 113 private: | 116 private: |
| 114 TestRenderFrameHostCreationObserver child_creation_observer_; | 117 TestRenderFrameHostCreationObserver child_creation_observer_; |
| 115 | 118 |
| 116 std::string contents_mime_type_; | 119 std::string contents_mime_type_; |
| 117 | 120 |
| 118 // See set_simulate_history_list_was_cleared() above. | 121 // See set_simulate_history_list_was_cleared() above. |
| 119 bool simulate_history_list_was_cleared_; | 122 bool simulate_history_list_was_cleared_; |
| 120 | 123 |
| 121 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 124 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 122 }; | 125 }; |
| 123 | 126 |
| 124 } // namespace content | 127 } // namespace content |
| 125 | 128 |
| 126 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 129 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |