Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 367653002: Add a FrameHostMsg_BeginNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.h
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h
index b7039f5cbe7b8a6959f6c2d93bb69a65f7f27c21..a9c2893c5ca5aa46274575b394efc465580b0ca5 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -17,6 +17,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/common/referrer.h"
+struct FrameHostMsg_BeginNavigation_Params;
namespace content {
class BrowserContext;
@@ -27,6 +28,7 @@ class FrameTreeNode;
class NavigationControllerImpl;
class NavigationEntry;
class NavigationEntryImpl;
+class NavigationRequest;
class RenderFrameHost;
class RenderFrameHostDelegate;
class RenderFrameHostImpl;
@@ -300,6 +302,9 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
// of WebContentsImpl.
void ResetProxyHosts();
+ // Used to start a navigation, part of PlzNavigate project.
+ void BeginNavigation(const FrameHostMsg_BeginNavigation_Params& params);
+
private:
friend class RenderFrameHostManagerTest;
friend class TestWebContents;
@@ -349,6 +354,11 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
bool should_replace_current_entry;
};
+ // Returns the current navigation request (used in the PlzNavigate navigation
+ // logic refactoring project).
+ NavigationRequest* navigation_request_for_testing() const {
+ return navigation_request_.get(); }
+
// Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a
// FrameTreeNode's RenderFrameHostManager.
static bool ClearProxiesInSiteInstance(int32 site_instance_id,
@@ -494,6 +504,9 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
NotificationRegistrar registrar_;
+ // Owns a navigation request that originated in that frame until it commits.
+ scoped_ptr<NavigationRequest> navigation_request_;
+
base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);

Powered by Google App Engine
This is Rietveld 408576698