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

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: recreate WidgetViews when reusing RenderView 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 bool CreateRenderWidgetHostViewForRenderManager(
Charlie Reis 2015/08/28 18:58:26 Please add a comment indicating that cases that pr
lfg 2015/08/28 21:18:40 Removed the proxy_routing_id.
126 RenderViewHost* render_view_host,
127 int proxy_routing_id) = 0;
128 virtual bool CreateRenderFrameForRenderManager( 128 virtual bool CreateRenderFrameForRenderManager(
129 RenderFrameHost* render_frame_host, 129 RenderFrameHost* render_frame_host,
130 int parent_routing_id, 130 int parent_routing_id,
131 int previous_sibling_routing_id, 131 int previous_sibling_routing_id,
132 int proxy_routing_id) = 0; 132 int proxy_routing_id) = 0;
133 virtual void BeforeUnloadFiredFromRenderManager( 133 virtual void BeforeUnloadFiredFromRenderManager(
134 bool proceed, const base::TimeTicks& proceed_time, 134 bool proceed, const base::TimeTicks& proceed_time,
135 bool* proceed_to_fire_unload) = 0; 135 bool* proceed_to_fire_unload) = 0;
136 virtual void RenderProcessGoneFromRenderManager( 136 virtual void RenderProcessGoneFromRenderManager(
137 RenderViewHost* render_view_host) = 0; 137 RenderViewHost* render_view_host) = 0;
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 // Determines the appropriate url to use as the current url for SiteInstance 592 // Determines the appropriate url to use as the current url for SiteInstance
593 // selection. 593 // selection.
594 const GURL& GetCurrentURLForSiteInstance( 594 const GURL& GetCurrentURLForSiteInstance(
595 SiteInstance* current_instance, 595 SiteInstance* current_instance,
596 NavigationEntry* current_entry); 596 NavigationEntry* current_entry);
597 597
598 // Creates a new RenderFrameHostImpl for the |new_instance| and assign it to 598 // Creates a new RenderFrameHostImpl for the |new_instance| and assign it to
599 // |pending_render_frame_host_| while respecting the opener route if needed 599 // |pending_render_frame_host_| while respecting the opener route if needed
600 // and stores it in pending_render_frame_host_. 600 // and stores it in pending_render_frame_host_.
601 void CreatePendingRenderFrameHost(SiteInstance* old_instance, 601 void CreatePendingRenderFrameHost(SiteInstance* old_instance,
602 SiteInstance* new_instance, 602 SiteInstance* new_instance);
603 bool is_main_frame);
604 603
605 // Ensure that we have created all needed proxies for a new RFH with 604 // Ensure that we have created all needed proxies for a new RFH with
606 // SiteInstance |new_instance|: (1) create swapped-out RVHs and proxies for 605 // SiteInstance |new_instance|: (1) create swapped-out RVHs and proxies for
607 // the new RFH's opener chain if we are staying in the same BrowsingInstance; 606 // the new RFH's opener chain if we are staying in the same BrowsingInstance;
608 // (2) Create proxies for the new RFH's SiteInstance in its own frame tree; 607 // (2) Create proxies for the new RFH's SiteInstance in its own frame tree;
609 // (3) set any additional flags for the new RenderFrame with 608 // (3) set any additional flags for the new RenderFrame with
610 // |create_render_frame_flags|. 609 // |create_render_frame_flags|.
611 void CreateProxiesForNewRenderFrameHost(SiteInstance* old_instance, 610 void CreateProxiesForNewRenderFrameHost(SiteInstance* old_instance,
612 SiteInstance* new_instance, 611 SiteInstance* new_instance,
613 int* create_render_frame_flags); 612 int* create_render_frame_flags);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 SiteInstance* old_instance, 649 SiteInstance* old_instance,
651 SiteInstance* new_instance, 650 SiteInstance* new_instance,
652 int bindings); 651 int bindings);
653 652
654 // Sets up the necessary state for a new RenderViewHost. Creates a 653 // Sets up the necessary state for a new RenderViewHost. Creates a
655 // RenderFrameProxy in the target renderer process with the given 654 // RenderFrameProxy in the target renderer process with the given
656 // |proxy_routing_id|, which is used to route IPC messages when in swapped 655 // |proxy_routing_id|, which is used to route IPC messages when in swapped
657 // out state. Returns early if the RenderViewHost has already been 656 // out state. Returns early if the RenderViewHost has already been
658 // initialized for another RenderFrameHost. 657 // initialized for another RenderFrameHost.
659 bool InitRenderView(RenderViewHostImpl* render_view_host, 658 bool InitRenderView(RenderViewHostImpl* render_view_host,
660 int proxy_routing_id, 659 int proxy_routing_id);
661 bool for_main_frame_navigation);
662 660
663 // Initialization for RenderFrameHost uses the same sequence as InitRenderView 661 // Initialization for RenderFrameHost uses the same sequence as InitRenderView
664 // above. 662 // above.
665 bool InitRenderFrame(RenderFrameHostImpl* render_frame_host); 663 bool InitRenderFrame(RenderFrameHostImpl* render_frame_host);
666 664
667 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this 665 // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
668 // doesn't require the pending render_frame_host_ pointer to be non-NULL, 666 // doesn't require the pending render_frame_host_ pointer to be non-NULL,
669 // since there could be Web UI switching as well. Call this for every commit. 667 // since there could be Web UI switching as well. Call this for every commit.
670 // If PlzNavigate is enabled the method will set the speculative (not pending) 668 // If PlzNavigate is enabled the method will set the speculative (not pending)
671 // RenderFrameHost to be the active one. 669 // RenderFrameHost to be the active one.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 bool should_reuse_web_ui_; 809 bool should_reuse_web_ui_;
812 810
813 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 811 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
814 812
815 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 813 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
816 }; 814 };
817 815
818 } // namespace content 816 } // namespace content
819 817
820 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 818 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698