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_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_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 "base/time/time.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
12 #include "ui/base/window_open_disposition.h" | 12 #include "ui/base/window_open_disposition.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 struct FrameHostMsg_BeginNavigation_Params; | 15 struct FrameHostMsg_BeginNavigation_Params; |
16 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 16 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class TimeTicks; | 20 class TimeTicks; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 class NavigationControllerImpl; | 25 class NavigationControllerImpl; |
26 class NavigationEntryImpl; | 26 class NavigationEntryImpl; |
27 class NavigatorDelegate; | 27 class NavigatorDelegate; |
28 class RenderFrameHostImpl; | 28 class RenderFrameHostImpl; |
29 struct NavigationBeforeCommitInfo; | 29 struct CommitNavigationParams; |
| 30 struct CommonNavigationParams; |
30 | 31 |
31 // Implementations of this interface are responsible for performing navigations | 32 // Implementations of this interface are responsible for performing navigations |
32 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode | 33 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode |
33 // objects that are using it and will be released once all nodes that use it are | 34 // objects that are using it and will be released once all nodes that use it are |
34 // freed. The Navigator is bound to a single frame tree and cannot be used by | 35 // freed. The Navigator is bound to a single frame tree and cannot be used by |
35 // multiple instances of FrameTree. | 36 // multiple instances of FrameTree. |
36 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad | 37 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad |
37 // from WebContentsImpl to this interface. | 38 // from WebContentsImpl to this interface. |
38 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { | 39 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { |
39 public: | 40 public: |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 ui::PageTransition page_transition, | 108 ui::PageTransition page_transition, |
108 WindowOpenDisposition disposition, | 109 WindowOpenDisposition disposition, |
109 const GlobalRequestID& transferred_global_request_id, | 110 const GlobalRequestID& transferred_global_request_id, |
110 bool should_replace_current_entry, | 111 bool should_replace_current_entry, |
111 bool user_gesture) {} | 112 bool user_gesture) {} |
112 | 113 |
113 // PlzNavigate | 114 // PlzNavigate |
114 // Signal |render_frame_host| that a navigation is ready to commit (the | 115 // Signal |render_frame_host| that a navigation is ready to commit (the |
115 // response to the navigation request has been received). | 116 // response to the navigation request has been received). |
116 virtual void CommitNavigation(RenderFrameHostImpl* render_frame_host, | 117 virtual void CommitNavigation(RenderFrameHostImpl* render_frame_host, |
117 const NavigationBeforeCommitInfo& info) {}; | 118 const GURL& stream_url, |
| 119 const CommonNavigationParams& common_params, |
| 120 const CommitNavigationParams& commit_params) {} |
118 | 121 |
119 // Called when the first resource request for a given navigation is executed | 122 // Called when the first resource request for a given navigation is executed |
120 // so that it can be tracked into an histogram. | 123 // so that it can be tracked into an histogram. |
121 virtual void LogResourceRequestTime( | 124 virtual void LogResourceRequestTime( |
122 base::TimeTicks timestamp, const GURL& url) {}; | 125 base::TimeTicks timestamp, const GURL& url) {}; |
123 | 126 |
124 protected: | 127 protected: |
125 friend class base::RefCounted<Navigator>; | 128 friend class base::RefCounted<Navigator>; |
126 virtual ~Navigator() {} | 129 virtual ~Navigator() {} |
127 }; | 130 }; |
128 | 131 |
129 } // namespace content | 132 } // namespace content |
130 | 133 |
131 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 134 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
OLD | NEW |