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

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

Issue 1306053008: Avoid creating a RenderWidgetHostView for proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Functions and parameters whose description are prefixed by PlzNavigate are 109 // Functions and parameters whose description are prefixed by PlzNavigate are
110 // part of a navigation refactoring project, currently behind the 110 // part of a navigation refactoring project, currently behind the
111 // enable-browser-side-navigation flag. The idea is to move the logic behind 111 // enable-browser-side-navigation flag. The idea is to move the logic behind
112 // driving navigations from the renderer to the browser. 112 // driving navigations from the renderer to the browser.
113 class CONTENT_EXPORT Delegate { 113 class CONTENT_EXPORT Delegate {
114 public: 114 public:
115 // Initializes the given renderer if necessary and creates the view ID 115 // Initializes the given renderer if necessary and creates the view ID
116 // corresponding to this view host. If this method is not called and the 116 // corresponding to this view host. If this method is not called and the
117 // process is not shared, then the WebContentsImpl will act as though the 117 // process is not shared, then the WebContentsImpl will act as though the
118 // renderer is not running (i.e., it will render "sad tab"). This method is 118 // renderer is not running (i.e., it will render "sad tab"). This method is
119 // automatically called from LoadURL. |for_main_frame_navigation| indicates 119 // automatically called from LoadURL.
120 // whether this RenderViewHost is used to render a top-level frame, so the
121 // appropriate RenderWidgetHostView type is used.
122 virtual bool CreateRenderViewForRenderManager( 120 virtual bool CreateRenderViewForRenderManager(
123 RenderViewHost* render_view_host, 121 RenderViewHost* render_view_host,
124 int opener_frame_routing_id, 122 int opener_frame_routing_id,
125 int proxy_routing_id, 123 int proxy_routing_id,
126 const FrameReplicationState& replicated_frame_state, 124 const FrameReplicationState& replicated_frame_state) = 0;
127 bool for_main_frame_navigation) = 0; 125 virtual void CreateRenderWidgetHostViewForRenderManager(
126 RenderViewHost* render_view_host) = 0;
128 virtual bool CreateRenderFrameForRenderManager( 127 virtual bool CreateRenderFrameForRenderManager(
129 RenderFrameHost* render_frame_host, 128 RenderFrameHost* render_frame_host,
130 int proxy_routing_id, 129 int proxy_routing_id,
131 int opener_routing_id, 130 int opener_routing_id,
132 int parent_routing_id, 131 int parent_routing_id,
133 int previous_sibling_routing_id) = 0; 132 int previous_sibling_routing_id) = 0;
134 virtual void BeforeUnloadFiredFromRenderManager( 133 virtual void BeforeUnloadFiredFromRenderManager(
135 bool proceed, const base::TimeTicks& proceed_time, 134 bool proceed, const base::TimeTicks& proceed_time,
136 bool* proceed_to_fire_unload) = 0; 135 bool* proceed_to_fire_unload) = 0;
137 virtual void RenderProcessGoneFromRenderManager( 136 virtual void RenderProcessGoneFromRenderManager(
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 // Determines the appropriate url to use as the current url for SiteInstance 604 // Determines the appropriate url to use as the current url for SiteInstance
606 // selection. 605 // selection.
607 const GURL& GetCurrentURLForSiteInstance( 606 const GURL& GetCurrentURLForSiteInstance(
608 SiteInstance* current_instance, 607 SiteInstance* current_instance,
609 NavigationEntry* current_entry); 608 NavigationEntry* current_entry);
610 609
611 // Creates a new RenderFrameHostImpl for the |new_instance| and assign it to 610 // Creates a new RenderFrameHostImpl for the |new_instance| and assign it to
612 // |pending_render_frame_host_| while respecting the opener route if needed 611 // |pending_render_frame_host_| while respecting the opener route if needed
613 // and stores it in pending_render_frame_host_. 612 // and stores it in pending_render_frame_host_.
614 void CreatePendingRenderFrameHost(SiteInstance* old_instance, 613 void CreatePendingRenderFrameHost(SiteInstance* old_instance,
615 SiteInstance* new_instance, 614 SiteInstance* new_instance);
616 bool is_main_frame);
617 615
618 // Ensure that we have created all needed proxies for a new RFH with 616 // Ensure that we have created all needed proxies for a new RFH with
619 // SiteInstance |new_instance|: (1) create swapped-out RVHs and proxies for 617 // SiteInstance |new_instance|: (1) create swapped-out RVHs and proxies for
620 // the new RFH's opener chain if we are staying in the same BrowsingInstance; 618 // the new RFH's opener chain if we are staying in the same BrowsingInstance;
621 // (2) Create proxies for the new RFH's SiteInstance in its own frame tree. 619 // (2) Create proxies for the new RFH's SiteInstance in its own frame tree.
622 void CreateProxiesForNewRenderFrameHost(SiteInstance* old_instance, 620 void CreateProxiesForNewRenderFrameHost(SiteInstance* old_instance,
623 SiteInstance* new_instance); 621 SiteInstance* new_instance);
624 622
625 // Traverse the opener chain and populate |opener_frame_trees| with 623 // Traverse the opener chain and populate |opener_frame_trees| with
626 // all FrameTrees accessible by following frame openers of nodes in the 624 // all FrameTrees accessible by following frame openers of nodes in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 SiteInstance* old_instance, 656 SiteInstance* old_instance,
659 SiteInstance* new_instance, 657 SiteInstance* new_instance,
660 int bindings); 658 int bindings);
661 659
662 // Sets up the necessary state for a new RenderViewHost. Creates a 660 // Sets up the necessary state for a new RenderViewHost. Creates a
663 // RenderFrameProxy in the target renderer process with the given 661 // RenderFrameProxy in the target renderer process with the given
664 // |proxy_routing_id|, which is used to route IPC messages when in swapped 662 // |proxy_routing_id|, which is used to route IPC messages when in swapped
665 // out state. Returns early if the RenderViewHost has already been 663 // out state. Returns early if the RenderViewHost has already been
666 // initialized for another RenderFrameHost. 664 // initialized for another RenderFrameHost.
667 bool InitRenderView(RenderViewHostImpl* render_view_host, 665 bool InitRenderView(RenderViewHostImpl* render_view_host,
668 int proxy_routing_id, 666 int proxy_routing_id);
669 bool for_main_frame_navigation);
670 667
671 // Initialization for RenderFrameHost uses the same sequence as InitRenderView 668 // Initialization for RenderFrameHost uses the same sequence as InitRenderView
672 // above. 669 // above.
673 bool InitRenderFrame(RenderFrameHostImpl* render_frame_host); 670 bool InitRenderFrame(RenderFrameHostImpl* render_frame_host);
674 671
675 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this 672 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
676 // doesn't require the pending render_frame_host_ pointer to be non-NULL, 673 // doesn't require the pending render_frame_host_ pointer to be non-NULL,
677 // since there could be Web UI switching as well. Call this for every commit. 674 // since there could be Web UI switching as well. Call this for every commit.
678 // If PlzNavigate is enabled the method will set the speculative (not pending) 675 // If PlzNavigate is enabled the method will set the speculative (not pending)
679 // RenderFrameHost to be the active one. 676 // RenderFrameHost to be the active one.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 bool should_reuse_web_ui_; 816 bool should_reuse_web_ui_;
820 817
821 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 818 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
822 819
823 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 820 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
824 }; 821 };
825 822
826 } // namespace content 823 } // namespace content
827 824
828 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 825 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698