| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 class FrameTreeNode; | 25 class FrameTreeNode; |
| 26 class NavigationControllerImpl; | 26 class NavigationControllerImpl; |
| 27 class NavigationEntryImpl; | 27 class NavigationEntryImpl; |
| 28 class NavigationRequest; | 28 class NavigationRequest; |
| 29 class NavigatorDelegate; | 29 class NavigatorDelegate; |
| 30 class RenderFrameHostImpl; | 30 class RenderFrameHostImpl; |
| 31 class StreamHandle; |
| 31 struct CommonNavigationParams; | 32 struct CommonNavigationParams; |
| 32 struct NavigationBeforeCommitInfo; | 33 struct NavigationBeforeCommitInfo; |
| 34 struct ResourceResponse; |
| 33 | 35 |
| 34 // Implementations of this interface are responsible for performing navigations | 36 // Implementations of this interface are responsible for performing navigations |
| 35 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode | 37 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode |
| 36 // objects that are using it and will be released once all nodes that use it are | 38 // objects that are using it and will be released once all nodes that use it are |
| 37 // freed. The Navigator is bound to a single frame tree and cannot be used by | 39 // freed. The Navigator is bound to a single frame tree and cannot be used by |
| 38 // multiple instances of FrameTree. | 40 // multiple instances of FrameTree. |
| 39 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad | 41 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad |
| 40 // from WebContentsImpl to this interface. | 42 // from WebContentsImpl to this interface. |
| 41 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { | 43 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { |
| 42 public: | 44 public: |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // called). | 122 // called). |
| 121 virtual void OnBeginNavigation( | 123 virtual void OnBeginNavigation( |
| 122 FrameTreeNode* frame_tree_node, | 124 FrameTreeNode* frame_tree_node, |
| 123 const FrameHostMsg_BeginNavigation_Params& params, | 125 const FrameHostMsg_BeginNavigation_Params& params, |
| 124 const CommonNavigationParams& common_params) {} | 126 const CommonNavigationParams& common_params) {} |
| 125 | 127 |
| 126 // PlzNavigate | 128 // PlzNavigate |
| 127 // Signal |render_frame_host| that a navigation is ready to commit (the | 129 // Signal |render_frame_host| that a navigation is ready to commit (the |
| 128 // response to the navigation request has been received). | 130 // response to the navigation request has been received). |
| 129 virtual void CommitNavigation(FrameTreeNode* frame_tree_node, | 131 virtual void CommitNavigation(FrameTreeNode* frame_tree_node, |
| 130 const NavigationBeforeCommitInfo& info) {} | 132 ResourceResponse* response, |
| 133 scoped_ptr<StreamHandle> body); |
| 131 | 134 |
| 132 // PlzNavigate | 135 // PlzNavigate |
| 133 // Cancel a NavigationRequest for |frame_tree_node|. Called when | 136 // Cancel a NavigationRequest for |frame_tree_node|. Called when |
| 134 // |frame_tree_node| is destroyed. | 137 // |frame_tree_node| is destroyed. |
| 135 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {} | 138 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {} |
| 136 | 139 |
| 137 // Called when the first resource request for a given navigation is executed | 140 // Called when the first resource request for a given navigation is executed |
| 138 // so that it can be tracked into an histogram. | 141 // so that it can be tracked into an histogram. |
| 139 virtual void LogResourceRequestTime( | 142 virtual void LogResourceRequestTime( |
| 140 base::TimeTicks timestamp, const GURL& url) {}; | 143 base::TimeTicks timestamp, const GURL& url) {}; |
| 141 | 144 |
| 142 protected: | 145 protected: |
| 143 friend class base::RefCounted<Navigator>; | 146 friend class base::RefCounted<Navigator>; |
| 144 virtual ~Navigator() {} | 147 virtual ~Navigator() {} |
| 145 }; | 148 }; |
| 146 | 149 |
| 147 } // namespace content | 150 } // namespace content |
| 148 | 151 |
| 149 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 152 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
| OLD | NEW |