OLD | NEW |
---|---|
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 // to see what it should do. | 168 // to see what it should do. |
169 virtual bool FocusLocationBarByDefault() = 0; | 169 virtual bool FocusLocationBarByDefault() = 0; |
170 | 170 |
171 // Focuses the location bar. | 171 // Focuses the location bar. |
172 virtual void SetFocusToLocationBar(bool select_all) = 0; | 172 virtual void SetFocusToLocationBar(bool select_all) = 0; |
173 | 173 |
174 // Returns true if views created for this delegate should be created in a | 174 // Returns true if views created for this delegate should be created in a |
175 // hidden state. | 175 // hidden state. |
176 virtual bool IsHidden() = 0; | 176 virtual bool IsHidden() = 0; |
177 | 177 |
178 // Returns the FTN id of the embedder delegate (WebContents) that is hosting | |
Charlie Reis
2015/05/19 07:12:31
Let's update all the embedder/guest references to
lazyboy
2015/05/21 23:23:47
See overall CL comment.
Done.
| |
179 // this delegate (WebContents). Returns -1 if this WebContents does not | |
180 // have embedder delegate. | |
181 virtual int64 GetEmbedderFrameTreeNodeID() = 0; | |
182 | |
178 protected: | 183 protected: |
179 virtual ~Delegate() {} | 184 virtual ~Delegate() {} |
180 }; | 185 }; |
181 | 186 |
182 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown | 187 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown |
183 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of | 188 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of |
184 // WebContentsImpl. | 189 // WebContentsImpl. |
185 static bool ClearRFHsPendingShutdown(FrameTreeNode* node); | 190 static bool ClearRFHsPendingShutdown(FrameTreeNode* node); |
186 | 191 |
187 // All three delegate pointers must be non-NULL and are not owned by this | 192 // All three delegate pointers must be non-NULL and are not owned by this |
(...skipping 26 matching lines...) Expand all Loading... | |
214 } | 219 } |
215 | 220 |
216 // TODO(creis): Remove this when we no longer use RVH for navigation. | 221 // TODO(creis): Remove this when we no longer use RVH for navigation. |
217 RenderViewHostImpl* current_host() const; | 222 RenderViewHostImpl* current_host() const; |
218 | 223 |
219 // Returns the view associated with the current RenderViewHost, or NULL if | 224 // Returns the view associated with the current RenderViewHost, or NULL if |
220 // there is no current one. | 225 // there is no current one. |
221 RenderWidgetHostView* GetRenderWidgetHostView() const; | 226 RenderWidgetHostView* GetRenderWidgetHostView() const; |
222 | 227 |
223 RenderFrameProxyHost* GetProxyToParent(); | 228 RenderFrameProxyHost* GetProxyToParent(); |
229 RenderFrameProxyHost* GetProxyToEmbedder(); | |
230 | |
231 // Returns whether this manager belongs to a FTN that is a guest main frame. | |
232 bool IsGuest(); | |
224 | 233 |
225 // Returns the pending RenderFrameHost, or NULL if there is no pending one. | 234 // Returns the pending RenderFrameHost, or NULL if there is no pending one. |
226 RenderFrameHostImpl* pending_frame_host() const { | 235 RenderFrameHostImpl* pending_frame_host() const { |
227 return pending_render_frame_host_.get(); | 236 return pending_render_frame_host_.get(); |
228 } | 237 } |
229 | 238 |
230 // TODO(creis): Remove this when we no longer use RVH for navigation. | 239 // TODO(creis): Remove this when we no longer use RVH for navigation. |
231 RenderViewHostImpl* pending_render_view_host() const; | 240 RenderViewHostImpl* pending_render_view_host() const; |
232 | 241 |
233 // Returns the current committed Web UI or NULL if none applies. | 242 // Returns the current committed Web UI or NULL if none applies. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
420 void OnDidUpdateName(const std::string& name); | 429 void OnDidUpdateName(const std::string& name); |
421 | 430 |
422 // Send updated origin to all frame proxies when the frame navigates to a new | 431 // Send updated origin to all frame proxies when the frame navigates to a new |
423 // origin. | 432 // origin. |
424 void OnDidUpdateOrigin(const url::Origin& origin); | 433 void OnDidUpdateOrigin(const url::Origin& origin); |
425 | 434 |
426 void EnsureRenderViewInitialized(FrameTreeNode* source, | 435 void EnsureRenderViewInitialized(FrameTreeNode* source, |
427 RenderViewHostImpl* render_view_host, | 436 RenderViewHostImpl* render_view_host, |
428 SiteInstance* instance); | 437 SiteInstance* instance); |
429 | 438 |
439 // Called on the guest RFHM to create a proxy for this guest frame in its | |
440 // embedder process. | |
441 // Returns the proxy routing ID. | |
442 int CreateEmbedderProxy(SiteInstance* embedder_site_instance); | |
443 | |
444 // Called on the embedder RFHM to replace the initial guest frame in the | |
445 // embedder with the proxy that has routing id | |
446 // |proxy_to_embedder_routing_id|. | |
447 void ReplaceWithGuestProxy(int proxy_to_embedder_routing_id); | |
448 | |
449 // Sets the child RWHV for this guest frame. | |
450 void SetGuestRWHView(RenderWidgetHostView* child_rwhv); | |
451 | |
430 private: | 452 private: |
431 friend class FrameTreeVisualizer; | 453 friend class FrameTreeVisualizer; |
432 friend class NavigatorTestWithBrowserSideNavigation; | 454 friend class NavigatorTestWithBrowserSideNavigation; |
433 friend class RenderFrameHostManagerTest; | 455 friend class RenderFrameHostManagerTest; |
434 friend class TestWebContents; | 456 friend class TestWebContents; |
435 | 457 |
436 // Stores information regarding a SiteInstance targeted at a specific URL to | 458 // Stores information regarding a SiteInstance targeted at a specific URL to |
437 // allow for comparisons without having to actually create new instances. It | 459 // allow for comparisons without having to actually create new instances. It |
438 // can point to an existing one or store the details needed to create a new | 460 // can point to an existing one or store the details needed to create a new |
439 // one. | 461 // one. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
743 bool should_reuse_web_ui_; | 765 bool should_reuse_web_ui_; |
744 | 766 |
745 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 767 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
746 | 768 |
747 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 769 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
748 }; | 770 }; |
749 | 771 |
750 } // namespace content | 772 } // namespace content |
751 | 773 |
752 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 774 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |