Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
18 #include "base/gtest_prod_util.h" 18 #include "base/gtest_prod_util.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/ref_counted.h"
20 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
21 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
22 #include "base/time/time.h" 23 #include "base/time/time.h"
23 #include "build/build_config.h" 24 #include "build/build_config.h"
24 #include "content/browser/accessibility/browser_accessibility_manager.h" 25 #include "content/browser/accessibility/browser_accessibility_manager.h"
25 #include "content/browser/bad_message.h" 26 #include "content/browser/bad_message.h"
26 #include "content/browser/loader/global_routing_id.h" 27 #include "content/browser/loader/global_routing_id.h"
27 #include "content/browser/site_instance_impl.h" 28 #include "content/browser/site_instance_impl.h"
28 #include "content/browser/webui/web_ui_impl.h" 29 #include "content/browser/webui/web_ui_impl.h"
29 #include "content/common/accessibility_mode_enums.h" 30 #include "content/common/accessibility_mode_enums.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // Gives the ownership of |navigation_handle_| to the caller. 303 // Gives the ownership of |navigation_handle_| to the caller.
303 // This happens during transfer navigations, where it should be transferred 304 // This happens during transfer navigations, where it should be transferred
304 // from the RenderFrameHost that issued the initial request to the new 305 // from the RenderFrameHost that issued the initial request to the new
305 // RenderFrameHost that will issue the transferring request. 306 // RenderFrameHost that will issue the transferring request.
306 std::unique_ptr<NavigationHandleImpl> PassNavigationHandleOwnership(); 307 std::unique_ptr<NavigationHandleImpl> PassNavigationHandleOwnership();
307 308
308 // Called on the pending RenderFrameHost when the network response is ready to 309 // Called on the pending RenderFrameHost when the network response is ready to
309 // commit. We should ensure that the old RenderFrameHost runs its unload 310 // commit. We should ensure that the old RenderFrameHost runs its unload
310 // handler and determine whether a transfer to a different RenderFrameHost is 311 // handler and determine whether a transfer to a different RenderFrameHost is
311 // needed. 312 // needed.
312 void OnCrossSiteResponse(const GlobalRequestID& global_request_id, 313 void OnCrossSiteResponse(
313 std::unique_ptr<CrossSiteTransferringRequest> 314 const GlobalRequestID& global_request_id,
314 cross_site_transferring_request, 315 std::unique_ptr<CrossSiteTransferringRequest>
315 const std::vector<GURL>& transfer_url_chain, 316 cross_site_transferring_request,
316 const Referrer& referrer, 317 const std::vector<GURL>& transfer_url_chain,
317 ui::PageTransition page_transition, 318 const Referrer& referrer,
318 bool should_replace_current_entry); 319 ui::PageTransition page_transition,
320 bool should_replace_current_entry,
321 const scoped_refptr<ResourceRequestBody>& resource_request_body);
319 322
320 // Tells the renderer that this RenderFrame is being swapped out for one in a 323 // Tells the renderer that this RenderFrame is being swapped out for one in a
321 // different renderer process. It should run its unload handler and move to 324 // different renderer process. It should run its unload handler and move to
322 // a blank document. If |proxy| is not null, it should also create a 325 // a blank document. If |proxy| is not null, it should also create a
323 // RenderFrameProxy to replace the RenderFrame and set it to |is_loading| 326 // RenderFrameProxy to replace the RenderFrame and set it to |is_loading|
324 // state. The renderer should preserve the RenderFrameProxy object until it 327 // state. The renderer should preserve the RenderFrameProxy object until it
325 // exits, in case we come back. The renderer can exit if it has no other 328 // exits, in case we come back. The renderer can exit if it has no other
326 // active RenderFrames, but not until WasSwappedOut is called. 329 // active RenderFrames, but not until WasSwappedOut is called.
327 void SwapOut(RenderFrameProxyHost* proxy, bool is_loading); 330 void SwapOut(RenderFrameProxyHost* proxy, bool is_loading);
328 331
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 976
974 // NOTE: This must be the last member. 977 // NOTE: This must be the last member.
975 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 978 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
976 979
977 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 980 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
978 }; 981 };
979 982
980 } // namespace content 983 } // namespace content
981 984
982 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 985 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698