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