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 "base/memory/scoped_ptr.h" |
9 #include "base/time/time.h" | 10 #include "base/time/time.h" |
10 #include "base/tuple.h" | 11 #include "base/tuple.h" |
11 #include "content/browser/frame_host/navigation_controller_impl.h" | 12 #include "content/browser/frame_host/navigation_controller_impl.h" |
12 #include "content/browser/frame_host/navigator.h" | 13 #include "content/browser/frame_host/navigator.h" |
13 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
14 #include "url/gurl.h" | 15 #include "url/gurl.h" |
15 | 16 |
| 17 class GURL; |
16 struct FrameMsg_Navigate_Params; | 18 struct FrameMsg_Navigate_Params; |
17 | 19 |
18 namespace content { | 20 namespace content { |
19 | 21 |
20 class NavigationControllerImpl; | 22 class NavigationControllerImpl; |
21 class NavigatorDelegate; | 23 class NavigatorDelegate; |
22 struct LoadCommittedDetails; | 24 struct LoadCommittedDetails; |
| 25 struct CommitNavigationParams; |
| 26 struct CommonNavigationParams; |
| 27 struct RequestNavigationParams; |
23 | 28 |
24 // This class is an implementation of Navigator, responsible for managing | 29 // This class is an implementation of Navigator, responsible for managing |
25 // navigations in regular browser tabs. | 30 // navigations in regular browser tabs. |
26 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 31 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
27 public: | 32 public: |
28 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 33 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
29 NavigatorDelegate* delegate); | 34 NavigatorDelegate* delegate); |
30 | 35 |
31 // Fills in |params| based on the content of |entry|. | |
32 static void MakeNavigateParams(const NavigationEntryImpl& entry, | |
33 const NavigationControllerImpl& controller, | |
34 NavigationController::ReloadType reload_type, | |
35 base::TimeTicks navigation_start, | |
36 FrameMsg_Navigate_Params* params); | |
37 | |
38 // Navigator implementation. | 36 // Navigator implementation. |
39 virtual NavigationController* GetController() OVERRIDE; | 37 virtual NavigationController* GetController() OVERRIDE; |
40 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 38 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
41 const GURL& url, | 39 const GURL& url, |
42 bool is_transition_navigation) OVERRIDE; | 40 bool is_transition_navigation) OVERRIDE; |
43 virtual void DidFailProvisionalLoadWithError( | 41 virtual void DidFailProvisionalLoadWithError( |
44 RenderFrameHostImpl* render_frame_host, | 42 RenderFrameHostImpl* render_frame_host, |
45 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) | 43 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
46 OVERRIDE; | 44 OVERRIDE; |
47 virtual void DidFailLoadWithError( | 45 virtual void DidFailLoadWithError( |
(...skipping 19 matching lines...) Expand all Loading... |
67 const GURL& url, | 65 const GURL& url, |
68 const std::vector<GURL>& redirect_chain, | 66 const std::vector<GURL>& redirect_chain, |
69 const Referrer& referrer, | 67 const Referrer& referrer, |
70 ui::PageTransition page_transition, | 68 ui::PageTransition page_transition, |
71 WindowOpenDisposition disposition, | 69 WindowOpenDisposition disposition, |
72 const GlobalRequestID& transferred_global_request_id, | 70 const GlobalRequestID& transferred_global_request_id, |
73 bool should_replace_current_entry, | 71 bool should_replace_current_entry, |
74 bool user_gesture) OVERRIDE; | 72 bool user_gesture) OVERRIDE; |
75 virtual void CommitNavigation( | 73 virtual void CommitNavigation( |
76 RenderFrameHostImpl* render_frame_host, | 74 RenderFrameHostImpl* render_frame_host, |
77 const NavigationBeforeCommitInfo& info) OVERRIDE; | 75 const GURL& stream_url, |
78 | 76 const CommonNavigationParams& common_params, |
| 77 const CommitNavigationParams& commit_params) OVERRIDE; |
79 virtual void LogResourceRequestTime( | 78 virtual void LogResourceRequestTime( |
80 base::TimeTicks timestamp, const GURL& url) OVERRIDE; | 79 base::TimeTicks timestamp, const GURL& url) OVERRIDE; |
81 | 80 |
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, |
(...skipping 19 matching lines...) Expand all Loading... |
108 // The start time and URL for latest navigation request, used for feeding a | 107 // The start time and URL for latest navigation request, used for feeding a |
109 // few histograms under the Navigation group. | 108 // few histograms under the Navigation group. |
110 Tuple2<base::TimeTicks, GURL> navigation_start_time_and_url; | 109 Tuple2<base::TimeTicks, GURL> navigation_start_time_and_url; |
111 | 110 |
112 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 111 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
113 }; | 112 }; |
114 | 113 |
115 } // namespace content | 114 } // namespace content |
116 | 115 |
117 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 116 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |