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/time/time.h" |
| 10 #include "base/tuple.h" |
9 #include "content/browser/frame_host/navigation_controller_impl.h" | 11 #include "content/browser/frame_host/navigation_controller_impl.h" |
10 #include "content/browser/frame_host/navigator.h" | 12 #include "content/browser/frame_host/navigator.h" |
11 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "url/gurl.h" |
12 | 15 |
13 struct FrameMsg_Navigate_Params; | 16 struct FrameMsg_Navigate_Params; |
14 | 17 |
15 namespace content { | 18 namespace content { |
16 | 19 |
17 class NavigationControllerImpl; | 20 class NavigationControllerImpl; |
18 class NavigatorDelegate; | 21 class NavigatorDelegate; |
19 struct LoadCommittedDetails; | 22 struct LoadCommittedDetails; |
20 | 23 |
21 // This class is an implementation of Navigator, responsible for managing | 24 // This class is an implementation of Navigator, responsible for managing |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 const Referrer& referrer, | 69 const Referrer& referrer, |
67 ui::PageTransition page_transition, | 70 ui::PageTransition page_transition, |
68 WindowOpenDisposition disposition, | 71 WindowOpenDisposition disposition, |
69 const GlobalRequestID& transferred_global_request_id, | 72 const GlobalRequestID& transferred_global_request_id, |
70 bool should_replace_current_entry, | 73 bool should_replace_current_entry, |
71 bool user_gesture) OVERRIDE; | 74 bool user_gesture) OVERRIDE; |
72 virtual void CommitNavigation( | 75 virtual void CommitNavigation( |
73 RenderFrameHostImpl* render_frame_host, | 76 RenderFrameHostImpl* render_frame_host, |
74 const NavigationBeforeCommitInfo& info) OVERRIDE; | 77 const NavigationBeforeCommitInfo& info) OVERRIDE; |
75 | 78 |
| 79 virtual void LogResourceRequestTime( |
| 80 base::TimeTicks timestamp, const GURL& url) OVERRIDE; |
| 81 |
76 private: | 82 private: |
77 virtual ~NavigatorImpl() {} | 83 virtual ~NavigatorImpl(); |
78 | 84 |
79 // Navigates to the given entry, which must be the pending entry. Private | 85 // Navigates to the given entry, which must be the pending entry. Private |
80 // because all callers should use NavigateToPendingEntry. | 86 // because all callers should use NavigateToPendingEntry. |
81 bool NavigateToEntry( | 87 bool NavigateToEntry( |
82 RenderFrameHostImpl* render_frame_host, | 88 RenderFrameHostImpl* render_frame_host, |
83 const NavigationEntryImpl& entry, | 89 const NavigationEntryImpl& entry, |
84 NavigationController::ReloadType reload_type); | 90 NavigationController::ReloadType reload_type); |
85 | 91 |
86 bool ShouldAssignSiteForURL(const GURL& url); | 92 bool ShouldAssignSiteForURL(const GURL& url); |
87 | 93 |
88 void CheckWebUIRendererDoesNotDisplayNormalURL( | 94 void CheckWebUIRendererDoesNotDisplayNormalURL( |
89 RenderFrameHostImpl* render_frame_host, | 95 RenderFrameHostImpl* render_frame_host, |
90 const GURL& url); | 96 const GURL& url); |
91 | 97 |
92 // The NavigationController that will keep track of session history for all | 98 // The NavigationController that will keep track of session history for all |
93 // RenderFrameHost objects using this NavigatorImpl. | 99 // RenderFrameHost objects using this NavigatorImpl. |
94 // TODO(nasko): Move ownership of the NavigationController from | 100 // TODO(nasko): Move ownership of the NavigationController from |
95 // WebContentsImpl to this class. | 101 // WebContentsImpl to this class. |
96 NavigationControllerImpl* controller_; | 102 NavigationControllerImpl* controller_; |
97 | 103 |
98 // Used to notify the object embedding this Navigator about navigation | 104 // Used to notify the object embedding this Navigator about navigation |
99 // events. Can be NULL in tests. | 105 // events. Can be NULL in tests. |
100 NavigatorDelegate* delegate_; | 106 NavigatorDelegate* delegate_; |
101 | 107 |
| 108 // The start time and URL for latest navigation request, used for feeding a |
| 109 // few histograms under the Navigation group. |
| 110 Tuple2<base::TimeTicks, GURL> navigation_start_time_and_url; |
| 111 |
102 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 112 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
103 }; | 113 }; |
104 | 114 |
105 } // namespace content | 115 } // namespace content |
106 | 116 |
107 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 117 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |