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_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 #if defined(OS_ANDROID) | 327 #if defined(OS_ANDROID) |
328 base::TimeTicks intent_received_timestamp() const { | 328 base::TimeTicks intent_received_timestamp() const { |
329 return intent_received_timestamp_; | 329 return intent_received_timestamp_; |
330 } | 330 } |
331 | 331 |
332 void set_intent_received_timestamp( | 332 void set_intent_received_timestamp( |
333 const base::TimeTicks intent_received_timestamp) { | 333 const base::TimeTicks intent_received_timestamp) { |
334 intent_received_timestamp_ = intent_received_timestamp; | 334 intent_received_timestamp_ = intent_received_timestamp; |
335 } | 335 } |
| 336 |
| 337 bool has_user_gesture() const { |
| 338 return has_user_gesture_; |
| 339 } |
| 340 |
| 341 void set_has_user_gesture (bool has_user_gesture) { |
| 342 has_user_gesture_ = has_user_gesture; |
| 343 } |
336 #endif | 344 #endif |
337 | 345 |
338 private: | 346 private: |
339 // Finds the TreeNode associated with |frame_tree_node|, if any. | 347 // Finds the TreeNode associated with |frame_tree_node|, if any. |
340 NavigationEntryImpl::TreeNode* FindFrameEntry( | 348 NavigationEntryImpl::TreeNode* FindFrameEntry( |
341 FrameTreeNode* frame_tree_node) const; | 349 FrameTreeNode* frame_tree_node) const; |
342 | 350 |
343 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 351 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
344 // Session/Tab restore save portions of this class so that it can be recreated | 352 // Session/Tab restore save portions of this class so that it can be recreated |
345 // later. If you add a new field that needs to be persisted you'll have to | 353 // later. If you add a new field that needs to be persisted you'll have to |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 // not persisted because it is experimental and only used when the | 461 // not persisted because it is experimental and only used when the |
454 // --site-per-process flag is passed. It is cleared in |ResetForCommit| | 462 // --site-per-process flag is passed. It is cleared in |ResetForCommit| |
455 // because we only use it while the navigation is pending. | 463 // because we only use it while the navigation is pending. |
456 // TODO(creis): Move this to FrameNavigationEntry. | 464 // TODO(creis): Move this to FrameNavigationEntry. |
457 int frame_tree_node_id_; | 465 int frame_tree_node_id_; |
458 | 466 |
459 #if defined(OS_ANDROID) | 467 #if defined(OS_ANDROID) |
460 // The time at which Chrome received the Android Intent that triggered this | 468 // The time at which Chrome received the Android Intent that triggered this |
461 // URL load operation. Reset at commit and not persisted. | 469 // URL load operation. Reset at commit and not persisted. |
462 base::TimeTicks intent_received_timestamp_; | 470 base::TimeTicks intent_received_timestamp_; |
| 471 |
| 472 // Whether the URL load carries a user gesture. |
| 473 bool has_user_gesture_; |
463 #endif | 474 #endif |
464 | 475 |
465 // Used to store extra data to support browser features. This member is not | 476 // Used to store extra data to support browser features. This member is not |
466 // persisted, unless specific data is taken out/put back in at save/restore | 477 // persisted, unless specific data is taken out/put back in at save/restore |
467 // time (see TabNavigation for an example of this). | 478 // time (see TabNavigation for an example of this). |
468 std::map<std::string, base::string16> extra_data_; | 479 std::map<std::string, base::string16> extra_data_; |
469 | 480 |
470 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 481 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
471 }; | 482 }; |
472 | 483 |
473 } // namespace content | 484 } // namespace content |
474 | 485 |
475 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 486 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |