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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: some review comments addressed Created 5 years, 8 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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // to see what it should do. 166 // to see what it should do.
167 virtual bool FocusLocationBarByDefault() = 0; 167 virtual bool FocusLocationBarByDefault() = 0;
168 168
169 // Focuses the location bar. 169 // Focuses the location bar.
170 virtual void SetFocusToLocationBar(bool select_all) = 0; 170 virtual void SetFocusToLocationBar(bool select_all) = 0;
171 171
172 // Returns true if views created for this delegate should be created in a 172 // Returns true if views created for this delegate should be created in a
173 // hidden state. 173 // hidden state.
174 virtual bool IsHidden() = 0; 174 virtual bool IsHidden() = 0;
175 175
176 virtual int64 GetParentFrameTreeNodeID() = 0;
Charlie Reis 2015/04/08 23:42:11 This needs a better name. A RFHM belongs to a Fra
lazyboy 2015/04/14 01:38:03 Changed to GetEmbedderFrameTreeNodeID(), added doc
177
176 protected: 178 protected:
177 virtual ~Delegate() {} 179 virtual ~Delegate() {}
178 }; 180 };
179 181
180 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown 182 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown
181 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of 183 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of
182 // WebContentsImpl. 184 // WebContentsImpl.
183 static bool ClearRFHsPendingShutdown(FrameTreeNode* node); 185 static bool ClearRFHsPendingShutdown(FrameTreeNode* node);
184 186
185 // All three delegate pointers must be non-NULL and are not owned by this 187 // All three delegate pointers must be non-NULL and are not owned by this
(...skipping 26 matching lines...) Expand all
212 } 214 }
213 215
214 // TODO(creis): Remove this when we no longer use RVH for navigation. 216 // TODO(creis): Remove this when we no longer use RVH for navigation.
215 RenderViewHostImpl* current_host() const; 217 RenderViewHostImpl* current_host() const;
216 218
217 // Returns the view associated with the current RenderViewHost, or NULL if 219 // Returns the view associated with the current RenderViewHost, or NULL if
218 // there is no current one. 220 // there is no current one.
219 RenderWidgetHostView* GetRenderWidgetHostView() const; 221 RenderWidgetHostView* GetRenderWidgetHostView() const;
220 222
221 RenderFrameProxyHost* GetProxyToParent(); 223 RenderFrameProxyHost* GetProxyToParent();
224 RenderFrameProxyHost* GetProxyToEmbedder();
222 225
223 // Returns the pending RenderFrameHost, or NULL if there is no pending one. 226 // Returns the pending RenderFrameHost, or NULL if there is no pending one.
224 RenderFrameHostImpl* pending_frame_host() const { 227 RenderFrameHostImpl* pending_frame_host() const {
225 return pending_render_frame_host_.get(); 228 return pending_render_frame_host_.get();
226 } 229 }
227 230
228 // TODO(creis): Remove this when we no longer use RVH for navigation. 231 // TODO(creis): Remove this when we no longer use RVH for navigation.
229 RenderViewHostImpl* pending_render_view_host() const; 232 RenderViewHostImpl* pending_render_view_host() const;
230 233
231 // Returns the current committed Web UI or NULL if none applies. 234 // Returns the current committed Web UI or NULL if none applies.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 void OnDidStopLoading(); 411 void OnDidStopLoading();
409 412
410 // Send updated frame name to all frame proxies when the frame changes its 413 // Send updated frame name to all frame proxies when the frame changes its
411 // window.name property. 414 // window.name property.
412 void OnDidUpdateName(const std::string& name); 415 void OnDidUpdateName(const std::string& name);
413 416
414 void EnsureRenderViewInitialized(FrameTreeNode* source, 417 void EnsureRenderViewInitialized(FrameTreeNode* source,
415 RenderViewHostImpl* render_view_host, 418 RenderViewHostImpl* render_view_host,
416 SiteInstance* instance); 419 SiteInstance* instance);
417 420
421 // Creates a proxy pointing to embedder process inside a guest RFHM.
Charlie Reis 2015/04/08 23:42:11 Terminology: "proxy for frame X in process Y" Poin
lazyboy 2015/04/14 01:38:03 Thanks for the terminology. Changed.
422 // This proxy is used to swap out the initial guest frame in embedder.
423 // Returns the routing id of the created proxy.
424 int CreateEmbedderProxy(SiteInstance* embedder_site_instance,
425 int* swapped_out_render_view_routing_id);
Charlie Reis 2015/04/08 23:42:11 Let's avoid having a mix of return parameters and
lazyboy 2015/04/14 01:38:03 I've changed both to out parameters.
426
427 // Replaces initial guest frame in embedder with the proxy that has routing
428 // id |proxy_to_embedder_routing_id|.
429 void ReplaceWithGuestProxy(int proxy_to_embedder_routing_id);
430
418 private: 431 private:
419 friend class NavigatorTestWithBrowserSideNavigation; 432 friend class NavigatorTestWithBrowserSideNavigation;
420 friend class RenderFrameHostManagerTest; 433 friend class RenderFrameHostManagerTest;
421 friend class TestWebContents; 434 friend class TestWebContents;
422 435
423 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest, 436 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest,
424 CreateCrossProcessSubframeProxies); 437 CreateCrossProcessSubframeProxies);
425 438
426 // Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a 439 // Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a
427 // FrameTreeNode's RenderFrameHostManager. 440 // FrameTreeNode's RenderFrameHostManager.
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 bool should_reuse_web_ui_; 716 bool should_reuse_web_ui_;
704 717
705 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 718 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
706 719
707 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 720 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
708 }; 721 };
709 722
710 } // namespace content 723 } // namespace content
711 724
712 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 725 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698