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_FRAME_TREE_NODE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
nhiroki
2015/08/19 07:42:33
nit: can you include "base/time/time.h"?
jeremyarcher
2015/08/19 07:50:57
Done.
| |
14 #include "content/browser/frame_host/render_frame_host_impl.h" | 14 #include "content/browser/frame_host/render_frame_host_impl.h" |
15 #include "content/browser/frame_host/render_frame_host_manager.h" | 15 #include "content/browser/frame_host/render_frame_host_manager.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 #include "content/common/frame_replication_state.h" | 17 #include "content/common/frame_replication_state.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 #include "url/origin.h" | 19 #include "url/origin.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 class FrameTree; | 23 class FrameTree; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 // The load progress for a RenderFrameHost in this node was updated to | 196 // The load progress for a RenderFrameHost in this node was updated to |
197 // |load_progress|. This will notify the FrameTree which will in turn notify | 197 // |load_progress|. This will notify the FrameTree which will in turn notify |
198 // the WebContents. | 198 // the WebContents. |
199 void DidChangeLoadProgress(double load_progress); | 199 void DidChangeLoadProgress(double load_progress); |
200 | 200 |
201 // Called when the user directed the page to stop loading. Stops all loads | 201 // Called when the user directed the page to stop loading. Stops all loads |
202 // happening in the FrameTreeNode. This method should be used with | 202 // happening in the FrameTreeNode. This method should be used with |
203 // FrameTree::ForEach to stop all loads in the entire FrameTree. | 203 // FrameTree::ForEach to stop all loads in the entire FrameTree. |
204 bool StopLoading(); | 204 bool StopLoading(); |
205 | 205 |
206 // Returns the time this frame was last focused. | |
207 base::TimeTicks last_focus_time() const { return last_focus_time_; } | |
208 void set_last_focus_time(const base::TimeTicks& last_focus_time) { | |
209 last_focus_time_ = last_focus_time; | |
210 } | |
211 | |
206 private: | 212 private: |
207 class OpenerDestroyedObserver; | 213 class OpenerDestroyedObserver; |
208 | 214 |
209 void set_parent(FrameTreeNode* parent) { parent_ = parent; } | 215 void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
210 | 216 |
211 // The next available browser-global FrameTreeNode ID. | 217 // The next available browser-global FrameTreeNode ID. |
212 static int next_frame_tree_node_id_; | 218 static int next_frame_tree_node_id_; |
213 | 219 |
214 // The FrameTree that owns us. | 220 // The FrameTree that owns us. |
215 FrameTree* frame_tree_; // not owned. | 221 FrameTree* frame_tree_; // not owned. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 double loading_progress_; | 280 double loading_progress_; |
275 | 281 |
276 // PlzNavigate | 282 // PlzNavigate |
277 // Owns an ongoing NavigationRequest until it is ready to commit. It will then | 283 // Owns an ongoing NavigationRequest until it is ready to commit. It will then |
278 // be reset and a RenderFrameHost will be responsible for the navigation. | 284 // be reset and a RenderFrameHost will be responsible for the navigation. |
279 scoped_ptr<NavigationRequest> navigation_request_; | 285 scoped_ptr<NavigationRequest> navigation_request_; |
280 | 286 |
281 // List of objects observing this FrameTreeNode. | 287 // List of objects observing this FrameTreeNode. |
282 base::ObserverList<Observer> observers_; | 288 base::ObserverList<Observer> observers_; |
283 | 289 |
290 base::TimeTicks last_focus_time_; | |
291 | |
284 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 292 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
285 }; | 293 }; |
286 | 294 |
287 } // namespace content | 295 } // namespace content |
288 | 296 |
289 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 297 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |