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/browser/frame_host/navigator_delegate.h" | |
10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
11 #include "content/public/browser/navigation_controller.h" | 12 #include "content/public/browser/navigation_controller.h" |
12 #include "ui/base/window_open_disposition.h" | 13 #include "ui/base/window_open_disposition.h" |
13 | 14 |
14 class GURL; | 15 class GURL; |
15 struct FrameHostMsg_BeginNavigation_Params; | 16 struct FrameHostMsg_BeginNavigation_Params; |
16 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 17 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; | 18 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class TimeTicks; | 21 class TimeTicks; |
21 } | 22 } |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 | 25 |
25 class FrameTreeNode; | 26 class FrameTreeNode; |
26 class NavigationControllerImpl; | 27 class NavigationControllerImpl; |
27 class NavigationEntryImpl; | 28 class NavigationEntryImpl; |
28 class NavigationRequest; | 29 class NavigationRequest; |
29 class NavigatorDelegate; | |
30 class RenderFrameHostImpl; | 30 class RenderFrameHostImpl; |
31 class ResourceRequestBody; | 31 class ResourceRequestBody; |
32 class StreamHandle; | 32 class StreamHandle; |
33 struct BeginNavigationParams; | 33 struct BeginNavigationParams; |
34 struct CommonNavigationParams; | 34 struct CommonNavigationParams; |
35 struct ResourceResponse; | 35 struct ResourceResponse; |
36 | 36 |
37 // Implementations of this interface are responsible for performing navigations | 37 // Implementations of this interface are responsible for performing navigations |
38 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode | 38 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode |
39 // objects that are using it and will be released once all nodes that use it are | 39 // objects that are using it and will be released once all nodes that use it are |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 // If this method returns false, then the navigation is discarded (equivalent | 81 // If this method returns false, then the navigation is discarded (equivalent |
82 // to calling DiscardPendingEntry on the NavigationController). | 82 // to calling DiscardPendingEntry on the NavigationController). |
83 // | 83 // |
84 // TODO(nasko): Remove this method from the interface, since Navigator and | 84 // TODO(nasko): Remove this method from the interface, since Navigator and |
85 // NavigationController know about each other. This will be possible once | 85 // NavigationController know about each other. This will be possible once |
86 // initialization of Navigator and NavigationController is properly done. | 86 // initialization of Navigator and NavigationController is properly done. |
87 virtual bool NavigateToPendingEntry( | 87 virtual bool NavigateToPendingEntry( |
88 FrameTreeNode* frame_tree_node, | 88 FrameTreeNode* frame_tree_node, |
89 NavigationController::ReloadType reload_type); | 89 NavigationController::ReloadType reload_type); |
90 | 90 |
91 | |
92 // Navigation requests ------------------------------------------------------- | 91 // Navigation requests ------------------------------------------------------- |
93 | 92 |
94 virtual base::TimeTicks GetCurrentLoadStart(); | 93 virtual base::TimeTicks GetCurrentLoadStart(); |
95 | 94 |
96 // The RenderFrameHostImpl has received a request to open a URL with the | 95 // The RenderFrameHostImpl has received a request to open a URL with the |
97 // specified |disposition|. | 96 // specified |disposition|. |
98 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, | 97 virtual void RequestOpenURL(RenderFrameHostImpl* render_frame_host, |
99 const GURL& url, | 98 const GURL& url, |
100 SiteInstance* source_site_instance, | 99 SiteInstance* source_site_instance, |
101 const Referrer& referrer, | 100 const Referrer& referrer, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 // current navigation. | 159 // current navigation. |
161 virtual void LogBeforeUnloadTime( | 160 virtual void LogBeforeUnloadTime( |
162 const base::TimeTicks& renderer_before_unload_start_time, | 161 const base::TimeTicks& renderer_before_unload_start_time, |
163 const base::TimeTicks& renderer_before_unload_end_time) {} | 162 const base::TimeTicks& renderer_before_unload_end_time) {} |
164 | 163 |
165 // PlzNavigate | 164 // PlzNavigate |
166 // Returns whether there is an ongoing navigation waiting for the BeforeUnload | 165 // Returns whether there is an ongoing navigation waiting for the BeforeUnload |
167 // event to execute in the renderer process. | 166 // event to execute in the renderer process. |
168 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); | 167 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); |
169 | 168 |
169 // Returns the delegate of this Navigator. | |
170 virtual NavigatorDelegate* GetDelegate(); | |
nasko
2015/04/15 19:17:05
nit: I'd move this method right next to the GetCon
Charlie Reis
2015/04/15 23:37:53
+1, and I'd put it before GetController.
Fabrice (no longer in Chrome)
2015/04/16 13:55:25
Done.
| |
171 | |
170 protected: | 172 protected: |
171 friend class base::RefCounted<Navigator>; | 173 friend class base::RefCounted<Navigator>; |
172 virtual ~Navigator() {} | 174 virtual ~Navigator() {} |
173 }; | 175 }; |
174 | 176 |
175 } // namespace content | 177 } // namespace content |
176 | 178 |
177 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 179 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
OLD | NEW |