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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 245 |
246 // Resume navigation paused after receiving response headers. | 246 // Resume navigation paused after receiving response headers. |
247 void ResumeResponseDeferredAtStart(); | 247 void ResumeResponseDeferredAtStart(); |
248 | 248 |
249 // Called when a renderer's frame navigates. | 249 // Called when a renderer's frame navigates. |
250 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); | 250 void DidNavigateFrame(RenderFrameHostImpl* render_frame_host); |
251 | 251 |
252 // Called when a renderer sets its opener to null. | 252 // Called when a renderer sets its opener to null. |
253 void DidDisownOpener(RenderFrameHost* render_frame_host); | 253 void DidDisownOpener(RenderFrameHost* render_frame_host); |
254 | 254 |
255 // Helper method to create and initialize a RenderFrameHost. If |swapped_out| | 255 // Helper method to create and initialize a RenderFrameHost. |
256 // is true, it will be initially placed on the swapped out hosts list. | |
257 // Returns the routing id of the *view* associated with the frame. | 256 // Returns the routing id of the *view* associated with the frame. |
258 int CreateRenderFrame(SiteInstance* instance, | 257 int CreateRenderFrame(SiteInstance* instance, |
259 int opener_route_id, | 258 int opener_route_id, |
260 bool swapped_out, | 259 int flags); |
261 bool for_main_frame_navigation, | |
262 bool hidden); | |
263 | 260 |
264 // Helper method to create and initialize a RenderFrameProxyHost and return | 261 // Helper method to create and initialize a RenderFrameProxyHost and return |
265 // its routing id. | 262 // its routing id. |
266 int CreateRenderFrameProxy(SiteInstance* instance); | 263 int CreateRenderFrameProxy(SiteInstance* instance); |
267 | 264 |
268 // Sets the passed passed interstitial as the currently showing interstitial. | 265 // Sets the passed passed interstitial as the currently showing interstitial. |
269 // |interstitial_page| should be non NULL (use the remove_interstitial_page | 266 // |interstitial_page| should be non NULL (use the remove_interstitial_page |
270 // method to unset the interstitial) and no interstitial page should be set | 267 // method to unset the interstitial) and no interstitial page should be set |
271 // when there is already a non NULL interstitial page set. | 268 // when there is already a non NULL interstitial page set. |
272 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { | 269 void set_interstitial_page(InterstitialPageImpl* interstitial_page) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // the opener route if needed and stores it in pending_render_frame_host_. | 402 // the opener route if needed and stores it in pending_render_frame_host_. |
406 void CreateRenderFrameHostForNewSiteInstance( | 403 void CreateRenderFrameHostForNewSiteInstance( |
407 SiteInstance* old_instance, | 404 SiteInstance* old_instance, |
408 SiteInstance* new_instance, | 405 SiteInstance* new_instance, |
409 bool is_main_frame); | 406 bool is_main_frame); |
410 | 407 |
411 // Creates a RenderFrameHost and corresponding RenderViewHost if necessary. | 408 // Creates a RenderFrameHost and corresponding RenderViewHost if necessary. |
412 scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(SiteInstance* instance, | 409 scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(SiteInstance* instance, |
413 int view_routing_id, | 410 int view_routing_id, |
414 int frame_routing_id, | 411 int frame_routing_id, |
415 bool swapped_out, | 412 int flags); |
416 bool hidden); | |
417 | 413 |
418 // Sets up the necessary state for a new RenderViewHost with the given opener, | 414 // Sets up the necessary state for a new RenderViewHost with the given opener, |
419 // if necessary. It creates a RenderFrameProxy in the target renderer process | 415 // if necessary. It creates a RenderFrameProxy in the target renderer process |
420 // with the given |proxy_routing_id|, which is used to route IPC messages when | 416 // with the given |proxy_routing_id|, which is used to route IPC messages when |
421 // in swapped out state. Returns early if the RenderViewHost has already been | 417 // in swapped out state. Returns early if the RenderViewHost has already been |
422 // initialized for another RenderFrameHost. | 418 // initialized for another RenderFrameHost. |
423 // TODO(creis): opener_route_id is currently for the RenderViewHost but should | 419 // TODO(creis): opener_route_id is currently for the RenderViewHost but should |
424 // be for the RenderFrame, since frames can have openers. | 420 // be for the RenderFrame, since frames can have openers. |
425 bool InitRenderView(RenderViewHostImpl* render_view_host, | 421 bool InitRenderView(RenderViewHostImpl* render_view_host, |
426 int opener_route_id, | 422 int opener_route_id, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 scoped_ptr<NavigationRequest> navigation_request_; | 533 scoped_ptr<NavigationRequest> navigation_request_; |
538 | 534 |
539 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 535 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
540 | 536 |
541 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 537 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
542 }; | 538 }; |
543 | 539 |
544 } // namespace content | 540 } // namespace content |
545 | 541 |
546 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 542 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |