Chromium Code Reviews| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 ResourceResponse* response, | 133 ResourceResponse* response, |
| 134 scoped_ptr<StreamHandle> body); | 134 scoped_ptr<StreamHandle> body); |
| 135 | 135 |
| 136 // PlzNavigate | 136 // PlzNavigate |
| 137 // Cancel a NavigationRequest for |frame_tree_node|. Called when | 137 // Cancel a NavigationRequest for |frame_tree_node|. Called when |
| 138 // |frame_tree_node| is destroyed. | 138 // |frame_tree_node| is destroyed. |
| 139 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {} | 139 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {} |
| 140 | 140 |
| 141 // Called when the first resource request for a given navigation is executed | 141 // Called when the first resource request for a given navigation is executed |
| 142 // so that it can be tracked into an histogram. | 142 // so that it can be tracked into an histogram. |
| 143 // PlzNavigate: Called when a navigation is about to make its first potential | |
|
nasko
2015/02/02 18:28:53
nit: Why is it "potential"? Don't we always make a
carlosk
2015/02/03 11:00:04
So I just learned about that as well from clamy@:
clamy
2015/02/03 12:13:54
Maybe we can rephrase that as Called when the netw
carlosk
2015/02/03 12:48:34
Done.
| |
| 144 // network request so that the timestamp can be recorded into an histogram. | |
| 145 // TODO(carlosk): once PlzNavigate is the only navigation implementation | |
| 146 // remove the URL parameter and rename this method to better suit its naming | |
| 147 // conventions. | |
| 143 virtual void LogResourceRequestTime( | 148 virtual void LogResourceRequestTime( |
| 144 base::TimeTicks timestamp, const GURL& url) {}; | 149 base::TimeTicks timestamp, const GURL& url) {}; |
| 145 | 150 |
| 146 // Called to record the time it took to execute the before unload hook for the | 151 // Called to record the time it took to execute the before unload hook for the |
| 147 // current navigation. | 152 // current navigation. |
| 148 virtual void LogBeforeUnloadTime( | 153 virtual void LogBeforeUnloadTime( |
| 149 const base::TimeTicks& renderer_before_unload_start_time, | 154 const base::TimeTicks& renderer_before_unload_start_time, |
| 150 const base::TimeTicks& renderer_before_unload_end_time) {} | 155 const base::TimeTicks& renderer_before_unload_end_time) {} |
| 151 | 156 |
| 152 // PlzNavigate | 157 // PlzNavigate |
| 153 // Returns whether there is an ongoing navigation waiting for the BeforeUnload | 158 // Returns whether there is an ongoing navigation waiting for the BeforeUnload |
| 154 // event to execute in the renderer process. | 159 // event to execute in the renderer process. |
| 155 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); | 160 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); |
| 156 | 161 |
| 157 protected: | 162 protected: |
| 158 friend class base::RefCounted<Navigator>; | 163 friend class base::RefCounted<Navigator>; |
| 159 virtual ~Navigator() {} | 164 virtual ~Navigator() {} |
| 160 }; | 165 }; |
| 161 | 166 |
| 162 } // namespace content | 167 } // namespace content |
| 163 | 168 |
| 164 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 169 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
| OLD | NEW |