OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/shared/chrome/browser/tabs/web_state_opener.h" |
| 6 |
| 7 #import "ios/web/public/navigation_manager.h" |
| 8 #import "ios/web/public/web_state/web_state.h" |
| 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." |
| 12 #endif |
| 13 |
| 14 WebStateOpener::WebStateOpener(web::WebState* opener, int navigation_index) |
| 15 : opener(opener), navigation_index(navigation_index) { |
| 16 if (opener && navigation_index < 0) { |
| 17 this->navigation_index = |
| 18 opener->GetNavigationManager()->GetLastCommittedItemIndex(); |
| 19 } |
| 20 } |
OLD | NEW |