OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/public/test/fakes/test_navigation_manager.h" | 5 #import "ios/web/public/test/fakes/test_navigation_manager.h" |
6 | 6 |
| 7 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 8 #error "This file requires ARC support." |
| 9 #endif |
| 10 |
7 namespace web { | 11 namespace web { |
8 | 12 |
9 TestNavigationManager::TestNavigationManager() | 13 TestNavigationManager::TestNavigationManager() |
10 : items_index_(-1), | 14 : items_index_(-1), |
11 pending_item_(nullptr), | 15 pending_item_(nullptr), |
12 last_committed_item_(nullptr), | 16 last_committed_item_(nullptr), |
13 visible_item_(nullptr) {} | 17 visible_item_(nullptr) {} |
14 | 18 |
15 TestNavigationManager::~TestNavigationManager() {} | 19 TestNavigationManager::~TestNavigationManager() {} |
16 | 20 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // navigation manager. | 168 // navigation manager. |
165 void TestNavigationManager::AddItem(const GURL& url, | 169 void TestNavigationManager::AddItem(const GURL& url, |
166 ui::PageTransition transition) { | 170 ui::PageTransition transition) { |
167 items_.push_back(web::NavigationItem::Create()); | 171 items_.push_back(web::NavigationItem::Create()); |
168 items_.back()->SetTransitionType(transition); | 172 items_.back()->SetTransitionType(transition); |
169 items_.back()->SetURL(url); | 173 items_.back()->SetURL(url); |
170 SetLastCommittedItemIndex(GetItemCount() - 1); | 174 SetLastCommittedItemIndex(GetItemCount() - 1); |
171 } | 175 } |
172 | 176 |
173 } // namespace web | 177 } // namespace web |
OLD | NEW |