| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #import "ios/web/navigation/crw_session_controller.h" | 5 #import "ios/web/navigation/crw_session_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 sessionEntryWithURL:URL | 475 sessionEntryWithURL:URL |
| 476 referrer:referrer | 476 referrer:referrer |
| 477 transition:transition | 477 transition:transition |
| 478 initiationType:web::NavigationInitiationType::USER_INITIATED]); | 478 initiationType:web::NavigationInitiationType::USER_INITIATED]); |
| 479 | 479 |
| 480 web::NavigationItemImpl* pushedItem = [pushedEntry navigationItemImpl]; | 480 web::NavigationItemImpl* pushedItem = [pushedEntry navigationItemImpl]; |
| 481 pushedItem->SetUserAgentType(lastCommittedItem->GetUserAgentType()); | 481 pushedItem->SetUserAgentType(lastCommittedItem->GetUserAgentType()); |
| 482 pushedItem->SetSerializedStateObject(stateObject); | 482 pushedItem->SetSerializedStateObject(stateObject); |
| 483 pushedItem->SetIsCreatedFromPushState(true); | 483 pushedItem->SetIsCreatedFromPushState(true); |
| 484 pushedItem->GetSSL() = lastCommittedItem->GetSSL(); | 484 pushedItem->GetSSL() = lastCommittedItem->GetSSL(); |
| 485 pushedItem->SetTimestamp(_timeSmoother.GetSmoothedTime(base::Time::Now())); |
| 485 | 486 |
| 486 [self clearForwardItems]; | 487 [self clearForwardItems]; |
| 487 // Add the new entry at the end. | 488 // Add the new entry at the end. |
| 488 [_entries addObject:pushedEntry]; | 489 [_entries addObject:pushedEntry]; |
| 489 _previousNavigationIndex = _currentNavigationIndex; | 490 _previousNavigationIndex = _currentNavigationIndex; |
| 490 self.currentNavigationIndex = [_entries count] - 1; | 491 self.currentNavigationIndex = [_entries count] - 1; |
| 491 | 492 |
| 492 if (_navigationManager) | 493 if (_navigationManager) |
| 493 _navigationManager->OnNavigationItemCommitted(); | 494 _navigationManager->OnNavigationItemCommitted(); |
| 494 } | 495 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 701 } |
| 701 | 702 |
| 702 - (web::NavigationItemList)itemListForEntryList:(NSArray*)entries { | 703 - (web::NavigationItemList)itemListForEntryList:(NSArray*)entries { |
| 703 web::NavigationItemList list(entries.count); | 704 web::NavigationItemList list(entries.count); |
| 704 for (size_t index = 0; index < entries.count; ++index) | 705 for (size_t index = 0; index < entries.count; ++index) |
| 705 list[index] = [entries[index] navigationItem]; | 706 list[index] = [entries[index] navigationItem]; |
| 706 return list; | 707 return list; |
| 707 } | 708 } |
| 708 | 709 |
| 709 @end | 710 @end |
| OLD | NEW |