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

Unified Diff: ios/chrome/browser/web_state_list/web_state_opener.mm

Issue 2812623002: Revert of [ios] Move WebStateList to ios/chrome/browser/web_state_list. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/web_state_list/web_state_opener.mm
diff --git a/ios/chrome/browser/web_state_list/web_state_opener.mm b/ios/chrome/browser/web_state_list/web_state_opener.mm
deleted file mode 100644
index a26cca279360c6ec94e5244629cd18aa38d87be9..0000000000000000000000000000000000000000
--- a/ios/chrome/browser/web_state_list/web_state_opener.mm
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ios/chrome/browser/web_state_list/web_state_opener.h"
-
-#include "base/logging.h"
-#import "ios/web/public/navigation_manager.h"
-#import "ios/web/public/web_state/web_state.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-namespace {
-int NavigationIndexFromWebState(web::WebState* web_state) {
- if (!web_state)
- return -1;
-
- DCHECK(web_state->GetNavigationManager());
- return web_state->GetNavigationManager()->GetLastCommittedItemIndex();
-}
-} // namespace
-
-WebStateOpener::WebStateOpener(web::WebState* opener)
- : WebStateOpener(opener, NavigationIndexFromWebState(opener)) {}
-
-WebStateOpener::WebStateOpener(web::WebState* opener, int navigation_index)
- : opener(opener), navigation_index(navigation_index) {}
« no previous file with comments | « ios/chrome/browser/web_state_list/web_state_opener.h ('k') | ios/chrome/browser/web_state_list/web_state_opener_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698