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

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: rebase 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 the number of RenderFrameProxyHosts for this frame. 486 // Returns the number of RenderFrameProxyHosts for this frame.
487 int GetProxyCount(); 487 int GetProxyCount();
488 488
489 // Returns a copy of the map of proxy hosts. The keys are SiteInstance IDs, 489 // Sends an IPC message to every RenderView in the FrameTree.
nasko 2016/02/12 18:14:08 nit: Let's drop the RenderView part, as while tech
lfg 2016/03/02 18:29:08 Done.
490 // the values are RenderFrameProxyHosts. 490 void SendPageMsg(IPC::Message* msg);
nasko 2016/02/12 18:14:08 nit: Sorry, should've been more correct. SendPageM
lfg 2016/03/02 18:29:08 Done.
491 std::map<int, RenderFrameProxyHost*> GetAllProxyHostsForTesting(); 491
492 // Returns a const reference to the map of proxy hosts. The keys are
493 // SiteInstance IDs, the values are RenderFrameProxyHosts.
494 const std::unordered_map<int32_t, scoped_ptr<RenderFrameProxyHost>>&
495 GetAllProxyHostsForTesting() const {
496 return proxy_hosts_;
497 }
492 498
493 // SiteInstanceImpl::Observer 499 // SiteInstanceImpl::Observer
494 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override; 500 void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override;
495 void RenderProcessGone(SiteInstanceImpl* site_instance) override; 501 void RenderProcessGone(SiteInstanceImpl* site_instance) override;
496 502
497 private: 503 private:
498 friend class NavigatorTestWithBrowserSideNavigation; 504 friend class NavigatorTestWithBrowserSideNavigation;
499 friend class RenderFrameHostManagerTest; 505 friend class RenderFrameHostManagerTest;
500 friend class TestWebContents; 506 friend class TestWebContents;
501 507
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 753
748 // This is used to temporarily store the NavigationHandle during 754 // This is used to temporarily store the NavigationHandle during
749 // transferring navigations. The handle needs to be stored because the old 755 // transferring navigations. The handle needs to be stored because the old
750 // RenderFrameHost may be discarded before a new RenderFrameHost is created 756 // RenderFrameHost may be discarded before a new RenderFrameHost is created
751 // for the navigation. 757 // for the navigation.
752 // PlzNavigate: this will never be set since there are no transferring 758 // PlzNavigate: this will never be set since there are no transferring
753 // navigations in PlzNavigate. 759 // navigations in PlzNavigate.
754 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_; 760 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_;
755 761
756 // Proxy hosts, indexed by site instance ID. 762 // Proxy hosts, indexed by site instance ID.
757 base::ScopedPtrHashMap<int32_t, scoped_ptr<RenderFrameProxyHost>> 763 std::unordered_map<int32_t, scoped_ptr<RenderFrameProxyHost>> proxy_hosts_;
nasko 2016/02/12 18:14:08 Why make this change in this CL?
lfg 2016/03/02 18:29:08 Moved to another CL.
758 proxy_hosts_;
759 764
760 // A list of RenderFrameHosts waiting to shut down after swapping out. 765 // A list of RenderFrameHosts waiting to shut down after swapping out.
761 using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>; 766 using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>;
762 RFHPendingDeleteList pending_delete_hosts_; 767 RFHPendingDeleteList pending_delete_hosts_;
763 768
764 // The intersitial page currently shown if any, not own by this class 769 // The intersitial page currently shown if any, not own by this class
765 // (the InterstitialPage is self-owned, it deletes itself when hidden). 770 // (the InterstitialPage is self-owned, it deletes itself when hidden).
766 InterstitialPageImpl* interstitial_page_; 771 InterstitialPageImpl* interstitial_page_;
767 772
768 // PlzNavigate 773 // PlzNavigate
769 // Stores a speculative RenderFrameHost which is created early in a navigation 774 // Stores a speculative RenderFrameHost which is created early in a navigation
770 // so a renderer process can be started in parallel, if needed. 775 // so a renderer process can be started in parallel, if needed.
771 // This is purely a performance optimization and is not required for correct 776 // This is purely a performance optimization and is not required for correct
772 // behavior. The speculative RenderFrameHost might be discarded later on if 777 // behavior. The speculative RenderFrameHost might be discarded later on if
773 // the final URL's SiteInstance isn't compatible with the one used to create 778 // the final URL's SiteInstance isn't compatible with the one used to create
774 // it. 779 // it.
775 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the 780 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the
776 // pending one. 781 // pending one.
777 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; 782 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
778 783
779 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 784 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
780 785
781 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 786 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
782 }; 787 };
783 788
784 } // namespace content 789 } // namespace content
785 790
786 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 791 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698