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

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

Issue 2711733007: Revert of (Set)IsOverridingUserAgent should be called on VisibleItem (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 | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/navigation/crw_session_controller.mm » ('j') | 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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 1062
1063 return [tab canSwitchToReaderMode]; 1063 return [tab canSwitchToReaderMode];
1064 } 1064 }
1065 1065
1066 - (BOOL)canUseDesktopUserAgent { 1066 - (BOOL)canUseDesktopUserAgent {
1067 Tab* tab = [_model currentTab]; 1067 Tab* tab = [_model currentTab];
1068 if ([self isTabNativePage:tab]) 1068 if ([self isTabNativePage:tab])
1069 return NO; 1069 return NO;
1070 1070
1071 // If |useDesktopUserAgent| is |NO|, allow useDesktopUserAgent. 1071 // If |useDesktopUserAgent| is |NO|, allow useDesktopUserAgent.
1072 return !tab.usesDesktopUserAgent; 1072 return !tab.useDesktopUserAgent;
1073 } 1073 }
1074 1074
1075 // Whether the sharing menu should be shown. 1075 // Whether the sharing menu should be shown.
1076 - (BOOL)canShowShareMenu { 1076 - (BOOL)canShowShareMenu {
1077 Tab* tab = [_model currentTab]; 1077 Tab* tab = [_model currentTab];
1078 // TODO(shreyasv): Make it so the URL returned by the tab is always valid and 1078 // TODO(shreyasv): Make it so the URL returned by the tab is always valid and
1079 // remove check on net::NSURLWithGURL(tab.url) ( http://crbug.com/400999 ). 1079 // remove check on net::NSURLWithGURL(tab.url) ( http://crbug.com/400999 ).
1080 return tab && !tab.url.SchemeIs(kChromeUIScheme) && 1080 return tab && !tab.url.SchemeIs(kChromeUIScheme) &&
1081 net::NSURLWithGURL(tab.url); 1081 net::NSURLWithGURL(tab.url);
1082 } 1082 }
(...skipping 3712 matching lines...) Expand 10 before | Expand all | Expand 10 after
4795 if ((seenToolbar && !seenInfoBarContainer) || 4795 if ((seenToolbar && !seenInfoBarContainer) ||
4796 (seenInfoBarContainer && !seenContentArea)) 4796 (seenInfoBarContainer && !seenContentArea))
4797 return NO; 4797 return NO;
4798 } 4798 }
4799 return YES; 4799 return YES;
4800 } 4800 }
4801 4801
4802 #pragma mark - PreloadControllerDelegate methods 4802 #pragma mark - PreloadControllerDelegate methods
4803 4803
4804 - (BOOL)shouldUseDesktopUserAgent { 4804 - (BOOL)shouldUseDesktopUserAgent {
4805 return [_model currentTab].usesDesktopUserAgent; 4805 return [_model currentTab].useDesktopUserAgent;
4806 } 4806 }
4807 4807
4808 - (CRWSessionEntry*)currentSessionEntry { 4808 - (CRWSessionEntry*)currentSessionEntry {
4809 Tab* tab = [_model currentTab]; 4809 Tab* tab = [_model currentTab];
4810 if (![tab navigationManager]) 4810 if (![tab navigationManager])
4811 return nil; 4811 return nil;
4812 return [[tab navigationManager]->GetSessionController() currentEntry]; 4812 return [[tab navigationManager]->GetSessionController() currentEntry];
4813 } 4813 }
4814 4814
4815 #pragma mark - BookmarkBridgeMethods 4815 #pragma mark - BookmarkBridgeMethods
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
5013 5013
5014 - (UIView*)voiceSearchButton { 5014 - (UIView*)voiceSearchButton {
5015 return _voiceSearchButton; 5015 return _voiceSearchButton;
5016 } 5016 }
5017 5017
5018 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5018 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5019 return [self currentLogoAnimationControllerOwner]; 5019 return [self currentLogoAnimationControllerOwner];
5020 } 5020 }
5021 5021
5022 @end 5022 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/web/navigation/crw_session_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698