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 25 matching lines...) Expand all Loading... | |
36 class RenderFrameHostImpl; | 36 class RenderFrameHostImpl; |
37 class RenderFrameHostManagerTest; | 37 class RenderFrameHostManagerTest; |
38 class RenderFrameProxyHost; | 38 class RenderFrameProxyHost; |
39 class RenderViewHost; | 39 class RenderViewHost; |
40 class RenderViewHostImpl; | 40 class RenderViewHostImpl; |
41 class RenderWidgetHostDelegate; | 41 class RenderWidgetHostDelegate; |
42 class RenderWidgetHostView; | 42 class RenderWidgetHostView; |
43 class TestWebContents; | 43 class TestWebContents; |
44 class WebUIImpl; | 44 class WebUIImpl; |
45 struct NavigationBeforeCommitInfo; | 45 struct NavigationBeforeCommitInfo; |
46 struct NavigationParamsWithRequestAndCommitInfo; | |
46 | 47 |
47 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state | 48 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state |
48 // machine to make cross-process navigations in a frame possible. | 49 // machine to make cross-process navigations in a frame possible. |
49 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { | 50 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
50 public: | 51 public: |
51 // Functions implemented by our owner that we need. | 52 // Functions implemented by our owner that we need. |
52 // | 53 // |
53 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl | 54 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl |
54 // that are required to run this class. The design should probably be better | 55 // that are required to run this class. The design should probably be better |
55 // such that these are more clear. | 56 // such that these are more clear. |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 void ResetProxyHosts(); | 310 void ResetProxyHosts(); |
310 | 311 |
311 // Returns the routing id for a RenderFrameHost or RenderFrameHostProxy | 312 // Returns the routing id for a RenderFrameHost or RenderFrameHostProxy |
312 // that has the given SiteInstance and is associated with this | 313 // that has the given SiteInstance and is associated with this |
313 // RenderFrameHostManager. Returns MSG_ROUTING_NONE if none is found. | 314 // RenderFrameHostManager. Returns MSG_ROUTING_NONE if none is found. |
314 int GetRoutingIdForSiteInstance(SiteInstance* site_instance); | 315 int GetRoutingIdForSiteInstance(SiteInstance* site_instance); |
315 | 316 |
316 // PlzNavigate: sends a RequestNavigation IPC to the renderer to ask it to | 317 // PlzNavigate: sends a RequestNavigation IPC to the renderer to ask it to |
317 // navigate. If no live renderer is present, then the navigation request will | 318 // navigate. If no live renderer is present, then the navigation request will |
318 // be sent directly to the ResourceDispatcherHost. | 319 // be sent directly to the ResourceDispatcherHost. |
319 bool RequestNavigation(const NavigationEntryImpl& entry, | 320 bool RequestNavigation( |
320 const FrameMsg_Navigate_Params& navigate_params); | 321 scoped_ptr<NavigationParamsWithRequestAndCommitInfo> navigation_params); |
321 | 322 |
322 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called | 323 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called |
323 // directly by RequestNavigation when there is no live renderer. Otherwise, it | 324 // directly by RequestNavigation when there is no live renderer. Otherwise, it |
324 // is called following a BeginNavigation IPC from the renderer (which in | 325 // is called following a BeginNavigation IPC from the renderer (which in |
325 // browser-initiated navigation also happens after RequestNavigation has been | 326 // browser-initiated navigation also happens after RequestNavigation has been |
326 // called). | 327 // called). |
327 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); | 328 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); |
328 | 329 |
329 // PlzNavigate: Called when a navigation request has received a response, to | 330 // PlzNavigate: Called when a navigation request has received a response, to |
330 // select a renderer to use for the navigation. | 331 // select a renderer to use for the navigation. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
528 // The intersitial page currently shown if any, not own by this class | 529 // The intersitial page currently shown if any, not own by this class |
529 // (the InterstitialPage is self-owned, it deletes itself when hidden). | 530 // (the InterstitialPage is self-owned, it deletes itself when hidden). |
530 InterstitialPageImpl* interstitial_page_; | 531 InterstitialPageImpl* interstitial_page_; |
531 | 532 |
532 NotificationRegistrar registrar_; | 533 NotificationRegistrar registrar_; |
533 | 534 |
534 // PlzNavigate: Owns a navigation request that originated in that frame until | 535 // PlzNavigate: Owns a navigation request that originated in that frame until |
535 // it commits. | 536 // it commits. |
536 scoped_ptr<NavigationRequest> navigation_request_; | 537 scoped_ptr<NavigationRequest> navigation_request_; |
537 | 538 |
539 // PlzNavigate: Holds info that should be sent to the renderer when the | |
540 // navigation is about to commit. | |
541 scoped_ptr<NavigationParamsWithRequestAndCommitInfo> navigation_params_; | |
Charlie Reis
2014/09/15 21:19:40
I want to be careful before we add navigation-spec
clamy
2014/09/18 20:50:39
We need some of this state when the navigation is
| |
542 | |
538 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 543 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
539 | 544 |
540 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 545 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
541 }; | 546 }; |
542 | 547 |
543 } // namespace content | 548 } // namespace content |
544 | 549 |
545 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 550 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |