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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 | 382 |
383 // PlzNavigate | 383 // PlzNavigate |
384 // Notifies the RFHM that a navigation has begun so that it can speculatively | 384 // Notifies the RFHM that a navigation has begun so that it can speculatively |
385 // create a new RenderFrameHost (and potentially a new process) if needed. | 385 // create a new RenderFrameHost (and potentially a new process) if needed. |
386 void BeginNavigation(const NavigationRequest& request); | 386 void BeginNavigation(const NavigationRequest& request); |
387 | 387 |
388 // PlzNavigate | 388 // PlzNavigate |
389 // Called (possibly several times) during a navigation to select or create an | 389 // Called (possibly several times) during a navigation to select or create an |
390 // appropriate RenderFrameHost for the provided URL. The returned pointer will | 390 // appropriate RenderFrameHost for the provided URL. The returned pointer will |
391 // be for the current or the speculative RenderFrameHost and the instance is | 391 // be for the current or the speculative RenderFrameHost and the instance is |
392 // owned by this manager. | 392 // owned by this manager. |is_for_commit| is true if the RenderFrameHostImpl |
393 // is assured to commit a navigation and is no longer speculative. | |
clamy
2015/04/02 12:52:35
I reintroduced the |is_for_commit| boolean, as it
Charlie Reis
2015/04/03 06:02:59
I don't see how that makes this boolean necessary,
| |
393 RenderFrameHostImpl* GetFrameHostForNavigation( | 394 RenderFrameHostImpl* GetFrameHostForNavigation( |
394 const NavigationRequest& request); | 395 const NavigationRequest& request, |
396 bool is_for_commit); | |
395 | 397 |
396 // PlzNavigate | 398 // PlzNavigate |
397 // Clean up any state for any ongoing navigation. | 399 // Clean up any state for any ongoing navigation. |
398 void CleanUpNavigation(); | 400 void CleanUpNavigation(); |
399 | 401 |
400 // PlzNavigate | 402 // PlzNavigate |
401 // Clears the speculative members, returning the RenderFrameHost to the caller | 403 // Clears the speculative members, returning the RenderFrameHost to the caller |
402 // for disposal. | 404 // for disposal. |
403 scoped_ptr<RenderFrameHostImpl> UnsetSpeculativeRenderFrameHost(); | 405 scoped_ptr<RenderFrameHostImpl> UnsetSpeculativeRenderFrameHost(); |
404 | 406 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
614 | 616 |
615 // For use in creating RenderFrameHosts. | 617 // For use in creating RenderFrameHosts. |
616 FrameTreeNode* frame_tree_node_; | 618 FrameTreeNode* frame_tree_node_; |
617 | 619 |
618 // Our delegate, not owned by us. Guaranteed non-NULL. | 620 // Our delegate, not owned by us. Guaranteed non-NULL. |
619 Delegate* delegate_; | 621 Delegate* delegate_; |
620 | 622 |
621 // Whether a navigation requiring different RenderFrameHosts is pending. This | 623 // Whether a navigation requiring different RenderFrameHosts is pending. This |
622 // is either for cross-site requests or when required for the process type | 624 // is either for cross-site requests or when required for the process type |
623 // (like WebUI). | 625 // (like WebUI). |
624 // PlzNavigate: |cross_navigation_pending_| is not used for browser-side | 626 // PlzNavigate: not used. |
Charlie Reis
2015/04/03 06:02:59
Great! I'll plan to remove it after your CL lands
| |
625 // navigation. | |
626 bool cross_navigation_pending_; | 627 bool cross_navigation_pending_; |
627 | 628 |
628 // Implemented by the owner of this class. These delegates are installed into | 629 // Implemented by the owner of this class. These delegates are installed into |
629 // all the RenderFrameHosts that we create. | 630 // all the RenderFrameHosts that we create. |
630 RenderFrameHostDelegate* render_frame_delegate_; | 631 RenderFrameHostDelegate* render_frame_delegate_; |
631 RenderViewHostDelegate* render_view_delegate_; | 632 RenderViewHostDelegate* render_view_delegate_; |
632 RenderWidgetHostDelegate* render_widget_delegate_; | 633 RenderWidgetHostDelegate* render_widget_delegate_; |
633 | 634 |
634 // Our RenderFrameHost and its associated Web UI (if any, will be NULL for | 635 // Our RenderFrameHost and its associated Web UI (if any, will be NULL for |
635 // non-WebUI pages). This object is responsible for all communication with | 636 // non-WebUI pages). This object is responsible for all communication with |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 // Note: PlzNavigate only uses speculative RenderFrameHost and WebUI, not | 696 // Note: PlzNavigate only uses speculative RenderFrameHost and WebUI, not |
696 // the pending ones. | 697 // the pending ones. |
697 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; | 698 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; |
698 scoped_ptr<WebUIImpl> speculative_web_ui_; | 699 scoped_ptr<WebUIImpl> speculative_web_ui_; |
699 | 700 |
700 // PlzNavigate | 701 // PlzNavigate |
701 // If true at navigation commit time the current WebUI will be kept instead of | 702 // If true at navigation commit time the current WebUI will be kept instead of |
702 // creating a new one. | 703 // creating a new one. |
703 bool should_reuse_web_ui_; | 704 bool should_reuse_web_ui_; |
704 | 705 |
706 // PlzNavigate | |
707 // Indicates that a commit is pending in the current/speculative | |
708 // RenderFrameHost. This happens after the response for a request has been | |
709 // received in the network stack and a RenderFrameHost has been chosen to | |
710 // handle it, but before the renderer committed the provisional load, | |
Charlie Reis
2015/04/03 06:02:59
nit: has committed
nit: end with period.
| |
711 bool pending_commit_current_frame_; | |
clamy
2015/04/02 12:52:35
With some sufficiently bad interleaving of request
| |
712 bool pending_commit_speculative_frame_; | |
713 | |
705 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 714 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
706 | 715 |
707 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 716 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
708 }; | 717 }; |
709 | 718 |
710 } // namespace content | 719 } // namespace content |
711 | 720 |
712 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 721 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |