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

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

Issue 2226023003: Fix RenderView reuse issues after a pending RenderFrameHost dies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve conflicts Created 4 years, 4 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_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // SiteInstance IDs, the values are RenderFrameProxyHosts. 501 // SiteInstance IDs, the values are RenderFrameProxyHosts.
502 const std::unordered_map<int32_t, std::unique_ptr<RenderFrameProxyHost>>& 502 const std::unordered_map<int32_t, std::unique_ptr<RenderFrameProxyHost>>&
503 GetAllProxyHostsForTesting() const { 503 GetAllProxyHostsForTesting() const {
504 return proxy_hosts_; 504 return proxy_hosts_;
505 } 505 }
506 506
507 // SiteInstanceImpl::Observer 507 // SiteInstanceImpl::Observer
508 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override; 508 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override;
509 void RenderProcessGone(SiteInstanceImpl* site_instance) override; 509 void RenderProcessGone(SiteInstanceImpl* site_instance) override;
510 510
511 // Cancels and destroys the pending or speculative RenderFrameHost if they
512 // match the provided |render_frame_host|.
513 void CancelPendingIfNecessary(RenderFrameHostImpl* render_frame_host);
514
511 // Sets up the necessary state for a new RenderViewHost. If |proxy| is not 515 // Sets up the necessary state for a new RenderViewHost. If |proxy| is not
512 // null, it creates a RenderFrameProxy in the target renderer process which is 516 // null, it creates a RenderFrameProxy in the target renderer process which is
513 // used to route IPC messages when in swapped out state. Returns early if the 517 // used to route IPC messages when in swapped out state. Returns early if the
514 // RenderViewHost has already been initialized for another RenderFrameHost. 518 // RenderViewHost has already been initialized for another RenderFrameHost.
515 bool InitRenderView(RenderViewHostImpl* render_view_host, 519 bool InitRenderView(RenderViewHostImpl* render_view_host,
516 RenderFrameProxyHost* proxy); 520 RenderFrameProxyHost* proxy);
517 521
518 // Terminates and deletes the pending RenderFrameHost. 522 // Terminates and deletes the pending RenderFrameHost.
519 void CancelPending(); 523 void CancelPending();
520 524
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 std::unique_ptr<RenderFrameHostImpl> speculative_render_frame_host_; 806 std::unique_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
803 807
804 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 808 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
805 809
806 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 810 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
807 }; 811 };
808 812
809 } // namespace content 813 } // namespace content
810 814
811 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 815 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698