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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 #endif | 630 #endif |
631 | 631 |
632 // Returns an unguessable token for this RFHI. This provides a temporary way | 632 // Returns an unguessable token for this RFHI. This provides a temporary way |
633 // to identify a RenderFrameHost that's compatible with IPC. Else, one needs | 633 // to identify a RenderFrameHost that's compatible with IPC. Else, one needs |
634 // to send pid + RoutingID, but one cannot send pid. One can get it from the | 634 // to send pid + RoutingID, but one cannot send pid. One can get it from the |
635 // channel, but this makes it much harder to get wrong. | 635 // channel, but this makes it much harder to get wrong. |
636 // Once media switches to mojo, we should be able to remove this in favor of | 636 // Once media switches to mojo, we should be able to remove this in favor of |
637 // sending a mojo overlay factory. | 637 // sending a mojo overlay factory. |
638 const base::UnguessableToken& GetOverlayRoutingToken(); | 638 const base::UnguessableToken& GetOverlayRoutingToken(); |
639 | 639 |
| 640 const StreamHandle* stream_handle_for_testing() const { |
| 641 return stream_handle_.get(); |
| 642 } |
| 643 |
640 protected: | 644 protected: |
641 friend class RenderFrameHostFactory; | 645 friend class RenderFrameHostFactory; |
642 | 646 |
643 // |flags| is a combination of CreateRenderFrameFlags. | 647 // |flags| is a combination of CreateRenderFrameFlags. |
644 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 648 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
645 // should be the abstraction needed here, but we need RenderViewHost to pass | 649 // should be the abstraction needed here, but we need RenderViewHost to pass |
646 // into WebContentsObserver::FrameDetached for now. | 650 // into WebContentsObserver::FrameDetached for now. |
647 RenderFrameHostImpl(SiteInstance* site_instance, | 651 RenderFrameHostImpl(SiteInstance* site_instance, |
648 RenderViewHostImpl* render_view_host, | 652 RenderViewHostImpl* render_view_host, |
649 RenderFrameHostDelegate* delegate, | 653 RenderFrameHostDelegate* delegate, |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 953 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
950 | 954 |
951 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. | 955 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. |
952 void BeforeUnloadTimeout(); | 956 void BeforeUnloadTimeout(); |
953 | 957 |
954 // Called when a navigation commits succesfully to |url|. This will update | 958 // Called when a navigation commits succesfully to |url|. This will update |
955 // |last_committed_site_url_| if it's not equal to the site url corresponding | 959 // |last_committed_site_url_| if it's not equal to the site url corresponding |
956 // to |url|. | 960 // to |url|. |
957 void SetLastCommittedSiteUrl(const GURL& url); | 961 void SetLastCommittedSiteUrl(const GURL& url); |
958 | 962 |
| 963 // PlzNavigate: Called when the frame has consumed the StreamHandle and it |
| 964 // can be released. |
| 965 void OnStreamHandleConsumed(const GURL& stream_url); |
| 966 |
959 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 967 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
960 // refcount that calls Shutdown when it reaches zero. This allows each | 968 // refcount that calls Shutdown when it reaches zero. This allows each |
961 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 969 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
962 // we have a RenderViewHost for each RenderFrameHost. | 970 // we have a RenderViewHost for each RenderFrameHost. |
963 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 971 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
964 // some form of page context. | 972 // some form of page context. |
965 RenderViewHostImpl* const render_view_host_; | 973 RenderViewHostImpl* const render_view_host_; |
966 | 974 |
967 RenderFrameHostDelegate* const delegate_; | 975 RenderFrameHostDelegate* const delegate_; |
968 | 976 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 | 1255 |
1248 // NOTE: This must be the last member. | 1256 // NOTE: This must be the last member. |
1249 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1257 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1250 | 1258 |
1251 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1259 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1252 }; | 1260 }; |
1253 | 1261 |
1254 } // namespace content | 1262 } // namespace content |
1255 | 1263 |
1256 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1264 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |