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_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 NavigatorDelegate; | 18 class NavigatorDelegate; |
19 struct LoadCommittedDetails; | 19 struct LoadCommittedDetails; |
20 | 20 |
21 // This class is an implementation of Navigator, responsible for managing | 21 // This class is an implementation of Navigator, responsible for managing |
22 // navigations in regular browser tabs. | 22 // navigations in regular browser tabs. |
23 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 23 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
24 public: | 24 public: |
25 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 25 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
26 NavigatorDelegate* delegate); | 26 NavigatorDelegate* delegate); |
27 | 27 |
28 // PlzNavigate: Returns a FramsMsg_Commit_Params filled in based on the | |
29 // contents of |entry|. | |
30 scoped_ptr<FrameMsg_CommitNavigation_Params> | |
nasko
2014/09/03 16:30:26
Now that these are no longer static, they should m
clamy
2014/09/03 22:23:44
Done.
| |
31 MakeCommitNavigationParams( | |
32 const NavigationEntryImpl& entry, | |
33 NavigationController::ReloadType reload_type); | |
34 | |
28 // Fills in |params| based on the content of |entry|. | 35 // Fills in |params| based on the content of |entry|. |
29 static void MakeNavigateParams(const NavigationEntryImpl& entry, | 36 void MakeNavigateParams(const NavigationEntryImpl& entry, |
30 const NavigationControllerImpl& controller, | |
31 NavigationController::ReloadType reload_type, | 37 NavigationController::ReloadType reload_type, |
32 base::TimeTicks navigation_start, | 38 base::TimeTicks navigation_start, |
33 FrameMsg_Navigate_Params* params); | 39 FrameMsg_Navigate_Params* params); |
34 | 40 |
35 // Navigator implementation. | 41 // Navigator implementation. |
36 virtual NavigationController* GetController() OVERRIDE; | 42 virtual NavigationController* GetController() OVERRIDE; |
37 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 43 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
38 const GURL& url, | 44 const GURL& url, |
39 bool is_transition_navigation) OVERRIDE; | 45 bool is_transition_navigation) OVERRIDE; |
40 virtual void DidFailProvisionalLoadWithError( | 46 virtual void DidFailProvisionalLoadWithError( |
(...skipping 29 matching lines...) Expand all Loading... | |
70 const GURL& url, | 76 const GURL& url, |
71 const std::vector<GURL>& redirect_chain, | 77 const std::vector<GURL>& redirect_chain, |
72 const Referrer& referrer, | 78 const Referrer& referrer, |
73 PageTransition page_transition, | 79 PageTransition page_transition, |
74 WindowOpenDisposition disposition, | 80 WindowOpenDisposition disposition, |
75 const GlobalRequestID& transferred_global_request_id, | 81 const GlobalRequestID& transferred_global_request_id, |
76 bool should_replace_current_entry, | 82 bool should_replace_current_entry, |
77 bool user_gesture) OVERRIDE; | 83 bool user_gesture) OVERRIDE; |
78 virtual void CommitNavigation( | 84 virtual void CommitNavigation( |
79 RenderFrameHostImpl* render_frame_host, | 85 RenderFrameHostImpl* render_frame_host, |
80 const NavigationBeforeCommitInfo& info) OVERRIDE; | 86 scoped_ptr<FrameMsg_CommitNavigation_Params> commit_navigation_params) |
87 OVERRIDE; | |
81 | 88 |
82 private: | 89 private: |
83 virtual ~NavigatorImpl() {} | 90 virtual ~NavigatorImpl() {} |
84 | 91 |
85 // Navigates to the given entry, which must be the pending entry. Private | 92 // Navigates to the given entry, which must be the pending entry. Private |
86 // because all callers should use NavigateToPendingEntry. | 93 // because all callers should use NavigateToPendingEntry. |
87 bool NavigateToEntry( | 94 bool NavigateToEntry( |
88 RenderFrameHostImpl* render_frame_host, | 95 RenderFrameHostImpl* render_frame_host, |
89 const NavigationEntryImpl& entry, | 96 const NavigationEntryImpl& entry, |
90 NavigationController::ReloadType reload_type); | 97 NavigationController::ReloadType reload_type); |
(...skipping 16 matching lines...) Expand all Loading... | |
107 | 114 |
108 // System time at which the current load was started. | 115 // System time at which the current load was started. |
109 base::TimeTicks current_load_start_; | 116 base::TimeTicks current_load_start_; |
110 | 117 |
111 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 118 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
112 }; | 119 }; |
113 | 120 |
114 } // namespace content | 121 } // namespace content |
115 | 122 |
116 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 123 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |