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

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

Issue 2775623002: [ios] WebStateList owns all WebState it manages. (Closed)
Patch Set: Fix gn check 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fullscreen_controller.h" 5 #import "ios/chrome/browser/ui/fullscreen_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/objc_property_releaser.h" 10 #include "base/mac/objc_property_releaser.h"
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 706
707 - (void)pageLoaded:(CRWWebController*)webController { 707 - (void)pageLoaded:(CRWWebController*)webController {
708 [self enableFullScreen]; 708 [self enableFullScreen];
709 web::WebState* webState = webController.webState; 709 web::WebState* webState = webController.webState;
710 if (webState) { 710 if (webState) {
711 BOOL MIMETypeIsPDF = webState->GetContentsMimeType() == "application/pdf"; 711 BOOL MIMETypeIsPDF = webState->GetContentsMimeType() == "application/pdf";
712 [webViewProxy_ setShouldUseInsetForTopPadding:MIMETypeIsPDF]; 712 [webViewProxy_ setShouldUseInsetForTopPadding:MIMETypeIsPDF];
713 } 713 }
714 } 714 }
715 715
716 - (void)webControllerWillClose:(CRWWebController*)webController {
717 [webController removeObserver:self];
718 }
719
720 #pragma mark - 716 #pragma mark -
721 #pragma mark CRWWebViewScrollViewObserver 717 #pragma mark CRWWebViewScrollViewObserver
722 718
723 - (void)webViewScrollViewDidScroll: 719 - (void)webViewScrollViewDidScroll:
724 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy { 720 (CRWWebViewScrollViewProxy*)webViewScrollViewProxy {
725 CGFloat previousRequestedContentOffset = 721 CGFloat previousRequestedContentOffset =
726 webViewScrollViewProxy.contentOffset.y; 722 webViewScrollViewProxy.contentOffset.y;
727 if ([self shouldIgnoreScroll:webViewScrollViewProxy]) { 723 if ([self shouldIgnoreScroll:webViewScrollViewProxy]) {
728 // Do not act on those events, just record the eventual move. 724 // Do not act on those events, just record the eventual move.
729 self.previousContentOffset = previousRequestedContentOffset; 725 self.previousContentOffset = previousRequestedContentOffset;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 overscrollActionsInProgress_ = NO; 813 overscrollActionsInProgress_ = NO;
818 } 814 }
819 815
820 #pragma mark - Used for testing 816 #pragma mark - Used for testing
821 817
822 + (void)setEnabledForTests:(BOOL)enabled { 818 + (void)setEnabledForTests:(BOOL)enabled {
823 gEnabledForTests = enabled; 819 gEnabledForTests = enabled;
824 } 820 }
825 821
826 @end 822 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/contextual_search/contextual_search_results_view.mm ('k') | ios/chrome/browser/ui/omnibox_perftest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698