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_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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 747 // RenderFrameHost may be discarded before a new RenderFrameHost is created | 747 // RenderFrameHost may be discarded before a new RenderFrameHost is created |
| 748 // for the navigation. | 748 // for the navigation. |
| 749 // PlzNavigate: this will never be set since there are no transferring | 749 // PlzNavigate: this will never be set since there are no transferring |
| 750 // navigations in PlzNavigate. | 750 // navigations in PlzNavigate. |
| 751 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_; | 751 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_; |
| 752 | 752 |
| 753 // Proxy hosts, indexed by site instance ID. | 753 // Proxy hosts, indexed by site instance ID. |
| 754 base::ScopedPtrHashMap<int32_t, scoped_ptr<RenderFrameProxyHost>> | 754 base::ScopedPtrHashMap<int32_t, scoped_ptr<RenderFrameProxyHost>> |
| 755 proxy_hosts_; | 755 proxy_hosts_; |
| 756 | 756 |
| 757 // A list of RenderFrameHosts waiting to shut down after swapping out. We use | 757 // A list of RenderFrameHosts waiting to shut down after swapping out. |
| 758 // a linked list since we expect frequent deletes and no indexed access, and | 758 using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>; |
|
dcheng
2016/01/20 08:55:20
Note: I could use std::set, but that still doesn't
Charlie Reis
2016/01/20 22:03:23
No, this seems fine.
| |
| 759 // because sets don't appear to support linked_ptrs. | |
| 760 typedef std::list<linked_ptr<RenderFrameHostImpl> > RFHPendingDeleteList; | |
| 761 RFHPendingDeleteList pending_delete_hosts_; | 759 RFHPendingDeleteList pending_delete_hosts_; |
| 762 | 760 |
| 763 // The intersitial page currently shown if any, not own by this class | 761 // The intersitial page currently shown if any, not own by this class |
| 764 // (the InterstitialPage is self-owned, it deletes itself when hidden). | 762 // (the InterstitialPage is self-owned, it deletes itself when hidden). |
| 765 InterstitialPageImpl* interstitial_page_; | 763 InterstitialPageImpl* interstitial_page_; |
| 766 | 764 |
| 767 // PlzNavigate | 765 // PlzNavigate |
| 768 // Stores a speculative RenderFrameHost which is created early in a navigation | 766 // Stores a speculative RenderFrameHost which is created early in a navigation |
| 769 // so a renderer process can be started in parallel, if needed. | 767 // so a renderer process can be started in parallel, if needed. |
| 770 // This is purely a performance optimization and is not required for correct | 768 // This is purely a performance optimization and is not required for correct |
| 771 // behavior. The speculative RenderFrameHost might be discarded later on if | 769 // behavior. The speculative RenderFrameHost might be discarded later on if |
| 772 // the final URL's SiteInstance isn't compatible with the one used to create | 770 // the final URL's SiteInstance isn't compatible with the one used to create |
| 773 // it. | 771 // it. |
| 774 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the | 772 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the |
| 775 // pending one. | 773 // pending one. |
| 776 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; | 774 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; |
| 777 | 775 |
| 778 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 776 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
| 779 | 777 |
| 780 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 778 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
| 781 }; | 779 }; |
| 782 | 780 |
| 783 } // namespace content | 781 } // namespace content |
| 784 | 782 |
| 785 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 783 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
| OLD | NEW |