Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: ios/shared/chrome/browser/tabs/web_state_opener.mm

Issue 2766413004: [ios] Change API to inform WebStateList of opener-opened relationship. (Closed)
Patch Set: Rebase on origin/master. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698