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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 // Returns the FTN id of the parent delegate (WebContents) that is hosting | |
Charlie Reis
2015/04/30 23:06:46
s/parent/embedder/
lazyboy
2015/05/05 07:28:14
Done for now.
Although it was suggested by nasko t
| |
177 // this delegate (WebContents), -1 if this WebContents does not have a | |
Charlie Reis
2015/04/30 23:06:46
Period. Then "Returns -1 if"
lazyboy
2015/05/05 07:28:14
Done.
| |
178 // parent delegate. | |
Charlie Reis
2015/04/30 23:06:46
s/parent/embedder/
lazyboy
2015/05/05 07:28:14
Done.
| |
179 virtual int64 GetEmbedderFrameTreeNodeID() = 0; | |
180 | |
176 protected: | 181 protected: |
177 virtual ~Delegate() {} | 182 virtual ~Delegate() {} |
178 }; | 183 }; |
179 | 184 |
180 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown | 185 // Used with FrameTree::ForEach to delete RenderFrameHosts pending shutdown |
181 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of | 186 // from a FrameTreeNode's RenderFrameHostManager. Used during destruction of |
182 // WebContentsImpl. | 187 // WebContentsImpl. |
183 static bool ClearRFHsPendingShutdown(FrameTreeNode* node); | 188 static bool ClearRFHsPendingShutdown(FrameTreeNode* node); |
184 | 189 |
185 // All three delegate pointers must be non-NULL and are not owned by this | 190 // All three delegate pointers must be non-NULL and are not owned by this |
(...skipping 26 matching lines...) Expand all Loading... | |
212 } | 217 } |
213 | 218 |
214 // TODO(creis): Remove this when we no longer use RVH for navigation. | 219 // TODO(creis): Remove this when we no longer use RVH for navigation. |
215 RenderViewHostImpl* current_host() const; | 220 RenderViewHostImpl* current_host() const; |
216 | 221 |
217 // Returns the view associated with the current RenderViewHost, or NULL if | 222 // Returns the view associated with the current RenderViewHost, or NULL if |
218 // there is no current one. | 223 // there is no current one. |
219 RenderWidgetHostView* GetRenderWidgetHostView() const; | 224 RenderWidgetHostView* GetRenderWidgetHostView() const; |
220 | 225 |
221 RenderFrameProxyHost* GetProxyToParent(); | 226 RenderFrameProxyHost* GetProxyToParent(); |
227 RenderFrameProxyHost* GetProxyToEmbedder(); | |
222 | 228 |
223 // Returns the pending RenderFrameHost, or NULL if there is no pending one. | 229 // Returns the pending RenderFrameHost, or NULL if there is no pending one. |
224 RenderFrameHostImpl* pending_frame_host() const { | 230 RenderFrameHostImpl* pending_frame_host() const { |
225 return pending_render_frame_host_.get(); | 231 return pending_render_frame_host_.get(); |
226 } | 232 } |
227 | 233 |
228 // TODO(creis): Remove this when we no longer use RVH for navigation. | 234 // TODO(creis): Remove this when we no longer use RVH for navigation. |
229 RenderViewHostImpl* pending_render_view_host() const; | 235 RenderViewHostImpl* pending_render_view_host() const; |
230 | 236 |
231 // Returns the current committed Web UI or NULL if none applies. | 237 // Returns the current committed Web UI or NULL if none applies. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 void OnDidStopLoading(); | 420 void OnDidStopLoading(); |
415 | 421 |
416 // Send updated frame name to all frame proxies when the frame changes its | 422 // Send updated frame name to all frame proxies when the frame changes its |
417 // window.name property. | 423 // window.name property. |
418 void OnDidUpdateName(const std::string& name); | 424 void OnDidUpdateName(const std::string& name); |
419 | 425 |
420 void EnsureRenderViewInitialized(FrameTreeNode* source, | 426 void EnsureRenderViewInitialized(FrameTreeNode* source, |
421 RenderViewHostImpl* render_view_host, | 427 RenderViewHostImpl* render_view_host, |
422 SiteInstance* instance); | 428 SiteInstance* instance); |
423 | 429 |
430 // Creates a proxy for guest frame in embedder's process. | |
Charlie Reis
2015/04/30 23:06:46
Called on the guest RFHM to create a proxy for thi
lazyboy
2015/05/05 07:28:13
Done.
| |
431 // This proxy is used to swap out the initial guest frame in embedder. | |
Charlie Reis
2015/04/30 23:06:46
in the embedder.
lazyboy
2015/05/05 07:28:14
Done.
| |
432 void CreateEmbedderProxy(SiteInstance* embedder_site_instance, | |
433 int* swapped_out_render_view_routing_id, | |
434 int* proxy_routing_id); | |
435 | |
436 // Replaces initial guest frame in embedder with the proxy that has routing | |
Charlie Reis
2015/04/30 23:06:46
Called on the embedder RFHM to replace the initial
lazyboy
2015/05/05 07:28:14
Done.
| |
437 // id |proxy_to_embedder_routing_id|. | |
438 void ReplaceWithGuestProxy(int proxy_to_embedder_routing_id); | |
439 | |
440 // Sets the child RWHV for this guest frame. | |
441 void UpdateGuestRWHView(RenderWidgetHostView* child_rwhv); | |
Charlie Reis
2015/04/30 23:06:46
SetGuestRenderWidgetHostView
lazyboy
2015/05/05 07:28:14
Done.
| |
442 | |
424 private: | 443 private: |
425 friend class FrameTreeVisualizer; | 444 friend class FrameTreeVisualizer; |
426 friend class NavigatorTestWithBrowserSideNavigation; | 445 friend class NavigatorTestWithBrowserSideNavigation; |
427 friend class RenderFrameHostManagerTest; | 446 friend class RenderFrameHostManagerTest; |
428 friend class TestWebContents; | 447 friend class TestWebContents; |
429 | 448 |
430 // Stores information regarding a SiteInstance targeted at a specific URL to | 449 // Stores information regarding a SiteInstance targeted at a specific URL to |
431 // allow for comparisons without having to actually create new instances. It | 450 // allow for comparisons without having to actually create new instances. It |
432 // can point to an existing one or store the details needed to create a new | 451 // can point to an existing one or store the details needed to create a new |
433 // one. | 452 // one. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
737 bool should_reuse_web_ui_; | 756 bool should_reuse_web_ui_; |
738 | 757 |
739 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 758 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
740 | 759 |
741 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 760 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
742 }; | 761 }; |
743 | 762 |
744 } // namespace content | 763 } // namespace content |
745 | 764 |
746 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 765 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |