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

Side by Side Diff: ios/chrome/browser/native_app_launcher/native_app_navigation_util.mm

Issue 2897213002: Removed NativeAppNavigationController and related code (Closed)
Patch Set: rebase Created 3 years, 6 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 #include "ios/chrome/browser/native_app_launcher/native_app_navigation_util.h"
6
7 #import "ios/chrome/browser/web/navigation_manager_util.h"
8 #import "ios/web/public/navigation_item.h"
9 #import "ios/web/public/web_state/web_state.h"
10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
15 namespace native_app_launcher {
16
17 bool IsLinkNavigation(web::WebState* web_state) {
18 DCHECK(web_state);
19 web::NavigationItem* item =
20 GetLastCommittedNonRedirectedItem(web_state->GetNavigationManager());
21 if (!item)
22 return false;
23 ui::PageTransition transition = item->GetTransitionType();
24 return PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_LINK) ||
25 PageTransitionCoreTypeIs(transition,
26 ui::PAGE_TRANSITION_AUTO_BOOKMARK);
27 }
28
29 } // namespace native_app_launcher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698