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

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

Issue 1685213002: Propagate window coordinates to out-of-process iframes renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sendscreenrects
Patch Set: fixing ordering in DepictFrameTree Created 4 years, 10 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // |outer_contents_site_instance|. The frame in outer WebContents that is 476 // |outer_contents_site_instance|. The frame in outer WebContents that is
477 // hosting the inner WebContents is |render_frame_host|, and the frame will 477 // hosting the inner WebContents is |render_frame_host|, and the frame will
478 // be swapped out with the proxy. 478 // be swapped out with the proxy.
479 void CreateOuterDelegateProxy(SiteInstance* outer_contents_site_instance, 479 void CreateOuterDelegateProxy(SiteInstance* outer_contents_site_instance,
480 RenderFrameHostImpl* render_frame_host); 480 RenderFrameHostImpl* render_frame_host);
481 481
482 // Sets the child RenderWidgetHostView for this frame, which must be part of 482 // Sets the child RenderWidgetHostView for this frame, which must be part of
483 // an inner WebContents. 483 // an inner WebContents.
484 void SetRWHViewForInnerContents(RenderWidgetHostView* child_rwhv); 484 void SetRWHViewForInnerContents(RenderWidgetHostView* child_rwhv);
485 485
486 // Returns a copy of the map of proxy hosts. The keys are SiteInstance IDs, 486 // Returns a const reference to the map of proxy hosts. The keys are
487 // the values are RenderFrameProxyHosts. 487 // SiteInstance IDs, the values are RenderFrameProxyHosts.
488 std::map<int, RenderFrameProxyHost*> GetAllProxyHostsForTesting(); 488 const std::unordered_map<int32_t, scoped_ptr<RenderFrameProxyHost>>&
489 GetAllProxyHosts() const {
490 return proxy_hosts_;
491 }
489 492
490 // SiteInstanceImpl::Observer 493 // SiteInstanceImpl::Observer
491 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override; 494 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override;
492 void RenderProcessGone(SiteInstanceImpl* site_instance) override; 495 void RenderProcessGone(SiteInstanceImpl* site_instance) override;
493 496
494 private: 497 private:
495 friend class NavigatorTestWithBrowserSideNavigation; 498 friend class NavigatorTestWithBrowserSideNavigation;
496 friend class RenderFrameHostManagerTest; 499 friend class RenderFrameHostManagerTest;
497 friend class TestWebContents; 500 friend class TestWebContents;
498 501
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 747
745 // This is used to temporarily store the NavigationHandle during 748 // This is used to temporarily store the NavigationHandle during
746 // transferring navigations. The handle needs to be stored because the old 749 // transferring navigations. The handle needs to be stored because the old
747 // RenderFrameHost may be discarded before a new RenderFrameHost is created 750 // RenderFrameHost may be discarded before a new RenderFrameHost is created
748 // for the navigation. 751 // for the navigation.
749 // PlzNavigate: this will never be set since there are no transferring 752 // PlzNavigate: this will never be set since there are no transferring
750 // navigations in PlzNavigate. 753 // navigations in PlzNavigate.
751 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_; 754 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_;
752 755
753 // Proxy hosts, indexed by site instance ID. 756 // Proxy hosts, indexed by site instance ID.
754 base::ScopedPtrHashMap<int32_t, scoped_ptr<RenderFrameProxyHost>> 757 std::unordered_map<int32_t, scoped_ptr<RenderFrameProxyHost>> proxy_hosts_;
755 proxy_hosts_;
756 758
757 // A list of RenderFrameHosts waiting to shut down after swapping out. 759 // A list of RenderFrameHosts waiting to shut down after swapping out.
758 using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>; 760 using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>;
759 RFHPendingDeleteList pending_delete_hosts_; 761 RFHPendingDeleteList pending_delete_hosts_;
760 762
761 // The intersitial page currently shown if any, not own by this class 763 // The intersitial page currently shown if any, not own by this class
762 // (the InterstitialPage is self-owned, it deletes itself when hidden). 764 // (the InterstitialPage is self-owned, it deletes itself when hidden).
763 InterstitialPageImpl* interstitial_page_; 765 InterstitialPageImpl* interstitial_page_;
764 766
765 // PlzNavigate 767 // PlzNavigate
766 // Stores a speculative RenderFrameHost which is created early in a navigation 768 // Stores a speculative RenderFrameHost which is created early in a navigation
767 // so a renderer process can be started in parallel, if needed. 769 // so a renderer process can be started in parallel, if needed.
768 // This is purely a performance optimization and is not required for correct 770 // This is purely a performance optimization and is not required for correct
769 // behavior. The speculative RenderFrameHost might be discarded later on if 771 // behavior. The speculative RenderFrameHost might be discarded later on if
770 // the final URL's SiteInstance isn't compatible with the one used to create 772 // the final URL's SiteInstance isn't compatible with the one used to create
771 // it. 773 // it.
772 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the 774 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the
773 // pending one. 775 // pending one.
774 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; 776 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
775 777
776 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 778 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
777 779
778 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 780 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
779 }; 781 };
780 782
781 } // namespace content 783 } // namespace content
782 784
783 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 785 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698