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 | |
(Do not use) nasko
2014/08/28 16:39:08
nit: Uppercase _commit_.
clamy
2014/09/02 18:25:19
Done.
| |
29 // contents of |entry|. | |
30 static scoped_ptr<FrameMsg_CommitNavigation_Params> | |
31 MakeCommitNavigationParams( | |
32 const NavigationEntryImpl& entry, | |
33 const NavigatorImpl* navigator, | |
34 NavigationController::ReloadType reload_type); | |
35 | |
28 // Fills in |params| based on the content of |entry|. | 36 // Fills in |params| based on the content of |entry|. |
29 static void MakeNavigateParams(const NavigationEntryImpl& entry, | 37 static void MakeNavigateParams(const NavigationEntryImpl& entry, |
30 const NavigationControllerImpl& controller, | 38 const NavigatorImpl* navigator, |
31 NavigationController::ReloadType reload_type, | 39 NavigationController::ReloadType reload_type, |
32 base::TimeTicks navigation_start, | 40 base::TimeTicks navigation_start, |
33 FrameMsg_Navigate_Params* params); | 41 FrameMsg_Navigate_Params* params); |
34 | 42 |
35 // Navigator implementation. | 43 // Navigator implementation. |
36 virtual NavigationController* GetController() OVERRIDE; | 44 virtual NavigationController* GetController() OVERRIDE; |
37 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 45 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
38 const GURL& url, | 46 const GURL& url, |
39 bool is_transition_navigation) OVERRIDE; | 47 bool is_transition_navigation) OVERRIDE; |
40 virtual void DidFailProvisionalLoadWithError( | 48 virtual void DidFailProvisionalLoadWithError( |
(...skipping 29 matching lines...) Expand all Loading... | |
70 const GURL& url, | 78 const GURL& url, |
71 const std::vector<GURL>& redirect_chain, | 79 const std::vector<GURL>& redirect_chain, |
72 const Referrer& referrer, | 80 const Referrer& referrer, |
73 PageTransition page_transition, | 81 PageTransition page_transition, |
74 WindowOpenDisposition disposition, | 82 WindowOpenDisposition disposition, |
75 const GlobalRequestID& transferred_global_request_id, | 83 const GlobalRequestID& transferred_global_request_id, |
76 bool should_replace_current_entry, | 84 bool should_replace_current_entry, |
77 bool user_gesture) OVERRIDE; | 85 bool user_gesture) OVERRIDE; |
78 virtual void CommitNavigation( | 86 virtual void CommitNavigation( |
79 RenderFrameHostImpl* render_frame_host, | 87 RenderFrameHostImpl* render_frame_host, |
80 const NavigationBeforeCommitInfo& info) OVERRIDE; | 88 scoped_ptr<FrameMsg_CommitNavigation_Params> commit_navigation_params) |
89 OVERRIDE; | |
81 | 90 |
82 private: | 91 private: |
83 virtual ~NavigatorImpl() {} | 92 virtual ~NavigatorImpl() {} |
84 | 93 |
85 // Navigates to the given entry, which must be the pending entry. Private | 94 // Navigates to the given entry, which must be the pending entry. Private |
86 // because all callers should use NavigateToPendingEntry. | 95 // because all callers should use NavigateToPendingEntry. |
87 bool NavigateToEntry( | 96 bool NavigateToEntry( |
88 RenderFrameHostImpl* render_frame_host, | 97 RenderFrameHostImpl* render_frame_host, |
89 const NavigationEntryImpl& entry, | 98 const NavigationEntryImpl& entry, |
90 NavigationController::ReloadType reload_type); | 99 NavigationController::ReloadType reload_type); |
(...skipping 16 matching lines...) Expand all Loading... | |
107 | 116 |
108 // System time at which the current load was started. | 117 // System time at which the current load was started. |
109 base::TimeTicks current_load_start_; | 118 base::TimeTicks current_load_start_; |
110 | 119 |
111 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 120 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
112 }; | 121 }; |
113 | 122 |
114 } // namespace content | 123 } // namespace content |
115 | 124 |
116 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 125 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |