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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2723683002: Test URL instead of VirtualURL in [BVC isTabNativePage] (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/chrome/browser/ui/browser_view_controller.h" 5 #import "ios/chrome/browser/ui/browser_view_controller.h"
6 6
7 #import <AssetsLibrary/AssetsLibrary.h> 7 #import <AssetsLibrary/AssetsLibrary.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 #import <PassKit/PassKit.h> 9 #import <PassKit/PassKit.h>
10 #import <Photos/Photos.h> 10 #import <Photos/Photos.h>
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 windowName:nil 2047 windowName:nil
2048 opener:nil 2048 opener:nil
2049 openedByDOM:NO 2049 openedByDOM:NO
2050 atIndex:position 2050 atIndex:position
2051 inBackground:NO]; 2051 inBackground:NO];
2052 return tab; 2052 return tab;
2053 } 2053 }
2054 2054
2055 // Whether the given tab's url begins with the chrome prefix. 2055 // Whether the given tab's url begins with the chrome prefix.
2056 - (BOOL)isTabNativePage:(Tab*)tab { 2056 - (BOOL)isTabNativePage:(Tab*)tab {
2057 return tab && tab.url.SchemeIs(kChromeUIScheme); 2057 return tab && tab.webState && tab.webState->GetNavigationManager() &&
Eugene But (OOO till 7-30) 2017/02/28 16:32:59 Optional nit: How about using local variables and
Eugene But (OOO till 7-30) 2017/02/28 16:33:00 |tab && | check is redundant, because if tab is ni
kkhorimoto 2017/02/28 18:50:29 Can we use GetWebClient()->IsAppSpecificURL() here
Olivier 2017/03/01 14:46:14 Done.
2058 tab.webState->GetNavigationManager()->GetVisibleItem() &&
2059 tab.webState->GetNavigationManager()
2060 ->GetVisibleItem()
2061 ->GetURL()
2062 .SchemeIs(kChromeUIScheme);
2058 } 2063 }
2059 2064
2060 - (void)expectNewForegroundTab { 2065 - (void)expectNewForegroundTab {
2061 _expectingForegroundTab = YES; 2066 _expectingForegroundTab = YES;
2062 } 2067 }
2063 2068
2064 - (UIImageView*)pageFullScreenOpenCloseAnimationView { 2069 - (UIImageView*)pageFullScreenOpenCloseAnimationView {
2065 CGRect viewBounds, remainder; 2070 CGRect viewBounds, remainder;
2066 CGRectDivide(self.view.bounds, &remainder, &viewBounds, StatusBarHeight(), 2071 CGRectDivide(self.view.bounds, &remainder, &viewBounds, StatusBarHeight(),
2067 CGRectMinYEdge); 2072 CGRectMinYEdge);
(...skipping 2957 matching lines...) Expand 10 before | Expand all | Expand 10 after
5025 5030
5026 - (UIView*)voiceSearchButton { 5031 - (UIView*)voiceSearchButton {
5027 return _voiceSearchButton; 5032 return _voiceSearchButton;
5028 } 5033 }
5029 5034
5030 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5035 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5031 return [self currentLogoAnimationControllerOwner]; 5036 return [self currentLogoAnimationControllerOwner];
5032 } 5037 }
5033 5038
5034 @end 5039 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698