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 outer WebContents that is hosting this | |
nasko
2015/05/22 16:32:27
nit: s/FTN/FrameTreeNode/
lazyboy
2015/05/26 16:32:54
Done.
| |
179 // (inner) WebContents. | |
180 // Returns -1 if this WebContents does not have an outer WebContents. | |
181 virtual int GetOuterWebContentsFrameTreeNodeID() = 0; | |
nasko
2015/05/22 16:32:27
At this layer (content/browser/frame_host) we don'
Charlie Reis
2015/05/22 23:44:31
In a sense, "delegate" refers to WebContents, so m
lazyboy
2015/05/26 16:32:54
Using GetOuterDelegateFrameTreeNodeID.
| |
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* GetProxyToOuterContents(); | |
nasko
2015/05/22 16:32:27
nit: Similar issue with Contents as above. This la
Charlie Reis
2015/05/22 23:44:30
GetProxyToOuterDelegate?
lazyboy
2015/05/26 16:32:54
Using GetProxyToOuterDelegate().
Done.
| |
230 | |
231 // Returns whether this manager belongs to a FTN that is a main frame in | |
nasko
2015/05/22 16:32:27
nit: s/FTN/FrameTreeNode/
lazyboy
2015/05/26 16:32:54
Done.
| |
232 // an inner WebContents. | |
233 // | |
234 // TODO(lazyboy): Make this work correctly for subframes inside inner | |
235 // WebContents too. | |
236 bool IsGuest(); | |
Charlie Reis
2015/05/22 23:44:30
ForInnerDelegate?
I'm ok with mentioning "inner W
lazyboy
2015/05/26 16:32:54
Done.
| |
224 | 237 |
225 // Returns the pending RenderFrameHost, or NULL if there is no pending one. | 238 // Returns the pending RenderFrameHost, or NULL if there is no pending one. |
226 RenderFrameHostImpl* pending_frame_host() const { | 239 RenderFrameHostImpl* pending_frame_host() const { |
227 return pending_render_frame_host_.get(); | 240 return pending_render_frame_host_.get(); |
228 } | 241 } |
229 | 242 |
230 // TODO(creis): Remove this when we no longer use RVH for navigation. | 243 // TODO(creis): Remove this when we no longer use RVH for navigation. |
231 RenderViewHostImpl* pending_render_view_host() const; | 244 RenderViewHostImpl* pending_render_view_host() const; |
232 | 245 |
233 // Returns the current committed Web UI or NULL if none applies. | 246 // Returns the current committed Web UI or NULL if none applies. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 void OnDidUpdateName(const std::string& name); | 420 void OnDidUpdateName(const std::string& name); |
408 | 421 |
409 // Send updated origin to all frame proxies when the frame navigates to a new | 422 // Send updated origin to all frame proxies when the frame navigates to a new |
410 // origin. | 423 // origin. |
411 void OnDidUpdateOrigin(const url::Origin& origin); | 424 void OnDidUpdateOrigin(const url::Origin& origin); |
412 | 425 |
413 void EnsureRenderViewInitialized(FrameTreeNode* source, | 426 void EnsureRenderViewInitialized(FrameTreeNode* source, |
414 RenderViewHostImpl* render_view_host, | 427 RenderViewHostImpl* render_view_host, |
415 SiteInstance* instance); | 428 SiteInstance* instance); |
416 | 429 |
430 // Called on the RFHM of the inner WebContents to create a proxy for this | |
431 // inner WebContents' frame in its outer WebContents' process. | |
Charlie Reis
2015/05/22 23:44:30
nit: WebContents's
(Always use 's when the noun i
lazyboy
2015/05/26 16:32:54
Done.
| |
432 // Returns the proxy routing ID. | |
433 int CreateOuterContentsProxy(SiteInstance* outer_contents_site_instance); | |
nasko
2015/05/22 16:32:27
Can we avoid using "Contents" here? The method see
Charlie Reis
2015/05/22 23:44:30
CreateOuterDelegateProxy(SiteInstance* outer_site_
lazyboy
2015/05/26 16:32:54
Done.
The method seems to just create a proxy bas
| |
434 | |
435 // Called on the RFHM of outer WebContents to replace the initial frame in the | |
436 // outer WebContents with the proxy that has routing id | |
437 // |proxy_to_outer_contents_routing_id|. | |
438 void ReplaceWithInnerContentsProxy(int proxy_to_outer_contents_routing_id); | |
nasko
2015/05/22 16:32:27
Maybe named "SwapFrameWithProxy"? Those are all ba
lazyboy
2015/05/26 16:32:54
Done.
Also, the comments about how WebContents are
| |
439 | |
440 // Sets the child RWHV for this frame that is part of an inner WebContents. | |
441 void SetRWHViewForInnerContents(RenderWidgetHostView* child_rwhv); | |
442 | |
417 private: | 443 private: |
418 friend class FrameTreeVisualizer; | 444 friend class FrameTreeVisualizer; |
419 friend class NavigatorTestWithBrowserSideNavigation; | 445 friend class NavigatorTestWithBrowserSideNavigation; |
420 friend class RenderFrameHostManagerTest; | 446 friend class RenderFrameHostManagerTest; |
421 friend class TestWebContents; | 447 friend class TestWebContents; |
422 | 448 |
423 // Stores information regarding a SiteInstance targeted at a specific URL to | 449 // Stores information regarding a SiteInstance targeted at a specific URL to |
424 // allow for comparisons without having to actually create new instances. It | 450 // allow for comparisons without having to actually create new instances. It |
425 // 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 |
426 // one. | 452 // one. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
730 bool should_reuse_web_ui_; | 756 bool should_reuse_web_ui_; |
731 | 757 |
732 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 758 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
733 | 759 |
734 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 760 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
735 }; | 761 }; |
736 | 762 |
737 } // namespace content | 763 } // namespace content |
738 | 764 |
739 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 765 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |