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() const { return stream_handle_.get(); } | |
clamy
2017/06/09 14:57:42
This is only used in tests right? If so, call it s
arthursonzogni
2017/06/12 09:30:15
Right! Done.
I didn't know it would be enforced at
| |
641 | |
640 protected: | 642 protected: |
641 friend class RenderFrameHostFactory; | 643 friend class RenderFrameHostFactory; |
642 | 644 |
643 // |flags| is a combination of CreateRenderFrameFlags. | 645 // |flags| is a combination of CreateRenderFrameFlags. |
644 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost | 646 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost |
645 // should be the abstraction needed here, but we need RenderViewHost to pass | 647 // should be the abstraction needed here, but we need RenderViewHost to pass |
646 // into WebContentsObserver::FrameDetached for now. | 648 // into WebContentsObserver::FrameDetached for now. |
647 RenderFrameHostImpl(SiteInstance* site_instance, | 649 RenderFrameHostImpl(SiteInstance* site_instance, |
648 RenderViewHostImpl* render_view_host, | 650 RenderViewHostImpl* render_view_host, |
649 RenderFrameHostDelegate* delegate, | 651 RenderFrameHostDelegate* delegate, |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
949 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 951 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
950 | 952 |
951 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. | 953 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. |
952 void BeforeUnloadTimeout(); | 954 void BeforeUnloadTimeout(); |
953 | 955 |
954 // Called when a navigation commits succesfully to |url|. This will update | 956 // 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 | 957 // |last_committed_site_url_| if it's not equal to the site url corresponding |
956 // to |url|. | 958 // to |url|. |
957 void SetLastCommittedSiteUrl(const GURL& url); | 959 void SetLastCommittedSiteUrl(const GURL& url); |
958 | 960 |
961 // PlzNavigate: Called when the frame has consumed the StreamHandle and it | |
962 // can be released. | |
963 void OnStreamHandleConsumed(const GURL& stream_url); | |
964 | |
959 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 965 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
960 // refcount that calls Shutdown when it reaches zero. This allows each | 966 // refcount that calls Shutdown when it reaches zero. This allows each |
961 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 967 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
962 // we have a RenderViewHost for each RenderFrameHost. | 968 // we have a RenderViewHost for each RenderFrameHost. |
963 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 969 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
964 // some form of page context. | 970 // some form of page context. |
965 RenderViewHostImpl* const render_view_host_; | 971 RenderViewHostImpl* const render_view_host_; |
966 | 972 |
967 RenderFrameHostDelegate* const delegate_; | 973 RenderFrameHostDelegate* const delegate_; |
968 | 974 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1247 | 1253 |
1248 // NOTE: This must be the last member. | 1254 // NOTE: This must be the last member. |
1249 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1255 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1250 | 1256 |
1251 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1257 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1252 }; | 1258 }; |
1253 | 1259 |
1254 } // namespace content | 1260 } // namespace content |
1255 | 1261 |
1256 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1262 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |