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

Side by Side Diff: content/browser/frame_host/navigator_impl.h

Issue 483773002: PlzNavigate: implement CommitNavigation on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a class to keep track of navigation parameters Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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_NAVIGATOR_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/browser/frame_host/navigation_controller_impl.h" 9 #include "content/browser/frame_host/navigation_controller_impl.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 12
13 struct FrameMsg_Navigate_Params; 13 struct FrameMsg_Navigate_Params;
14 14
15 namespace content { 15 namespace content {
16 16
17 class NavigationControllerImpl; 17 class NavigationControllerImpl;
18 class NavigationParameters;
18 class NavigatorDelegate; 19 class NavigatorDelegate;
19 struct LoadCommittedDetails; 20 struct LoadCommittedDetails;
20 21
21 // This class is an implementation of Navigator, responsible for managing 22 // This class is an implementation of Navigator, responsible for managing
22 // navigations in regular browser tabs. 23 // navigations in regular browser tabs.
23 class CONTENT_EXPORT NavigatorImpl : public Navigator { 24 class CONTENT_EXPORT NavigatorImpl : public Navigator {
24 public: 25 public:
25 NavigatorImpl(NavigationControllerImpl* navigation_controller, 26 NavigatorImpl(NavigationControllerImpl* navigation_controller,
26 NavigatorDelegate* delegate); 27 NavigatorDelegate* delegate);
27 28
28 // Fills in |params| based on the content of |entry|.
29 static void MakeNavigateParams(const NavigationEntryImpl& entry,
30 const NavigationControllerImpl& controller,
31 NavigationController::ReloadType reload_type,
32 base::TimeTicks navigation_start,
33 FrameMsg_Navigate_Params* params);
34
35 // Navigator implementation. 29 // Navigator implementation.
36 virtual NavigationController* GetController() OVERRIDE; 30 virtual NavigationController* GetController() OVERRIDE;
37 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 31 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
38 const GURL& url, 32 const GURL& url,
39 bool is_transition_navigation) OVERRIDE; 33 bool is_transition_navigation) OVERRIDE;
40 virtual void DidFailProvisionalLoadWithError( 34 virtual void DidFailProvisionalLoadWithError(
41 RenderFrameHostImpl* render_frame_host, 35 RenderFrameHostImpl* render_frame_host,
42 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) 36 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params)
43 OVERRIDE; 37 OVERRIDE;
44 virtual void DidFailLoadWithError( 38 virtual void DidFailLoadWithError(
(...skipping 25 matching lines...) Expand all
70 const GURL& url, 64 const GURL& url,
71 const std::vector<GURL>& redirect_chain, 65 const std::vector<GURL>& redirect_chain,
72 const Referrer& referrer, 66 const Referrer& referrer,
73 PageTransition page_transition, 67 PageTransition page_transition,
74 WindowOpenDisposition disposition, 68 WindowOpenDisposition disposition,
75 const GlobalRequestID& transferred_global_request_id, 69 const GlobalRequestID& transferred_global_request_id,
76 bool should_replace_current_entry, 70 bool should_replace_current_entry,
77 bool user_gesture) OVERRIDE; 71 bool user_gesture) OVERRIDE;
78 virtual void CommitNavigation( 72 virtual void CommitNavigation(
79 RenderFrameHostImpl* render_frame_host, 73 RenderFrameHostImpl* render_frame_host,
80 const NavigationBeforeCommitInfo& info) OVERRIDE; 74 const FrameMsg_CommitNavigation_Params& commit_navigation_params)
75 OVERRIDE;
81 76
77 // PlzNavigate
78 NavigationParameters* MakeNavigationParametersForTest(
79 const NavigationEntryImpl& entry,
80 NavigationController::ReloadType reload_type);
82 private: 81 private:
83 virtual ~NavigatorImpl() {} 82 virtual ~NavigatorImpl() {}
84 83
85 // Navigates to the given entry, which must be the pending entry. Private 84 // Navigates to the given entry, which must be the pending entry. Private
86 // because all callers should use NavigateToPendingEntry. 85 // because all callers should use NavigateToPendingEntry.
87 bool NavigateToEntry( 86 bool NavigateToEntry(
88 RenderFrameHostImpl* render_frame_host, 87 RenderFrameHostImpl* render_frame_host,
89 const NavigationEntryImpl& entry, 88 const NavigationEntryImpl& entry,
90 NavigationController::ReloadType reload_type); 89 NavigationController::ReloadType reload_type);
91 90
(...skipping 15 matching lines...) Expand all
107 106
108 // System time at which the current load was started. 107 // System time at which the current load was started.
109 base::TimeTicks current_load_start_; 108 base::TimeTicks current_load_start_;
110 109
111 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); 110 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl);
112 }; 111 };
113 112
114 } // namespace content 113 } // namespace content
115 114
116 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ 115 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698