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" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "content/browser/renderer_host/render_view_host_delegate.h" | 12 #include "content/browser/renderer_host/render_view_host_delegate.h" |
13 #include "content/browser/site_instance_impl.h" | 13 #include "content/browser/site_instance_impl.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/browser/global_request_id.h" | 15 #include "content/public/browser/global_request_id.h" |
16 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
18 #include "content/public/common/referrer.h" | 18 #include "content/public/common/referrer.h" |
19 | 19 |
20 struct FrameHostMsg_BeginNavigation_Params; | 20 struct FrameHostMsg_BeginNavigation_Params; |
21 struct FrameMsg_CommitNavigation_Params; | |
21 struct FrameMsg_Navigate_Params; | 22 struct FrameMsg_Navigate_Params; |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 class BrowserContext; | 25 class BrowserContext; |
25 class CrossProcessFrameConnector; | 26 class CrossProcessFrameConnector; |
26 class CrossSiteTransferringRequest; | 27 class CrossSiteTransferringRequest; |
27 class InterstitialPageImpl; | 28 class InterstitialPageImpl; |
28 class FrameTreeNode; | 29 class FrameTreeNode; |
29 class NavigationControllerImpl; | 30 class NavigationControllerImpl; |
30 class NavigationEntry; | 31 class NavigationEntry; |
(...skipping 278 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<FrameMsg_CommitNavigation_Params> commit_navigation_params, |
(Do not use) nasko
2014/08/28 16:39:09
Why do we need to have commit parameters at the Re
clamy
2014/09/02 18:25:19
Because they depend on information stored in the N
nasko
2014/09/03 16:30:26
Yes, I agree that we shouldn't depend on Navigatio
clamy
2014/09/03 17:15:15
I think that would work. This is essentially what
| |
322 const FrameMsg_Navigate_Params& navigate_params); | |
321 | 323 |
322 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called | 324 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called |
323 // directly by RequestNavigation when there is no live renderer. Otherwise, it | 325 // directly by RequestNavigation when there is no live renderer. Otherwise, it |
324 // is called following a BeginNavigation IPC from the renderer (which in | 326 // is called following a BeginNavigation IPC from the renderer (which in |
325 // browser-initiated navigation also happens after RequestNavigation has been | 327 // browser-initiated navigation also happens after RequestNavigation has been |
326 // called). | 328 // called). |
327 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); | 329 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); |
328 | 330 |
329 // PlzNavigate: Called when a navigation request has received a response, to | 331 // PlzNavigate: Called when a navigation request has received a response, to |
330 // select a renderer to use for the navigation. | 332 // 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 | 530 // The intersitial page currently shown if any, not own by this class |
529 // (the InterstitialPage is self-owned, it deletes itself when hidden). | 531 // (the InterstitialPage is self-owned, it deletes itself when hidden). |
530 InterstitialPageImpl* interstitial_page_; | 532 InterstitialPageImpl* interstitial_page_; |
531 | 533 |
532 NotificationRegistrar registrar_; | 534 NotificationRegistrar registrar_; |
533 | 535 |
534 // PlzNavigate: Owns a navigation request that originated in that frame until | 536 // PlzNavigate: Owns a navigation request that originated in that frame until |
535 // it commits. | 537 // it commits. |
536 scoped_ptr<NavigationRequest> navigation_request_; | 538 scoped_ptr<NavigationRequest> navigation_request_; |
537 | 539 |
540 // PlzNaigate: Holds info that should be sent to the renderer when the | |
541 // navigation is about to commit. | |
542 scoped_ptr<FrameMsg_CommitNavigation_Params> commit_navigation_params_; | |
543 | |
538 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; | 544 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; |
539 | 545 |
540 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); | 546 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); |
541 }; | 547 }; |
542 | 548 |
543 } // namespace content | 549 } // namespace content |
544 | 550 |
545 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ | 551 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ |
OLD | NEW |