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

Side by Side Diff: ios/chrome/browser/ui/overscroll_actions/overscroll_actions_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
« no previous file with comments | « ios/chrome/browser/ui/omnibox_perftest.mm ('k') | ios/chrome/browser/ui/preload_controller.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/overscroll_actions/overscroll_actions_controller. h" 5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 [_webViewScrollViewProxy removeObserver:self]; 512 [_webViewScrollViewProxy removeObserver:self];
513 _webViewScrollViewProxy.reset([[webViewProxy scrollViewProxy] retain]); 513 _webViewScrollViewProxy.reset([[webViewProxy scrollViewProxy] retain]);
514 [_webViewScrollViewProxy addObserver:self]; 514 [_webViewScrollViewProxy addObserver:self];
515 [self enableOverscrollActions]; 515 [self enableOverscrollActions];
516 } 516 }
517 517
518 - (void)webControllerWillClose:(CRWWebController*)webController { 518 - (void)webControllerWillClose:(CRWWebController*)webController {
519 [self disableOverscrollActions]; 519 [self disableOverscrollActions];
520 [_webViewScrollViewProxy removeObserver:self]; 520 [_webViewScrollViewProxy removeObserver:self];
521 _webViewScrollViewProxy.reset(); 521 _webViewScrollViewProxy.reset();
522 [webController removeObserver:self];
523 } 522 }
524 523
525 #pragma mark - Private 524 #pragma mark - Private
526 525
527 - (void)recordMetricForTriggeredAction:(OverscrollAction)action { 526 - (void)recordMetricForTriggeredAction:(OverscrollAction)action {
528 switch (action) { 527 switch (action) {
529 case OverscrollAction::NONE: 528 case OverscrollAction::NONE:
530 UMA_HISTOGRAM_ENUMERATION(kOverscrollActionsHistogram, 529 UMA_HISTOGRAM_ENUMERATION(kOverscrollActionsHistogram,
531 OVERSCROLL_ACTION_CANCELED, 530 OVERSCROLL_ACTION_CANCELED,
532 OVERSCROLL_ACTION_COUNT); 531 OVERSCROLL_ACTION_COUNT);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 overscrollActionsController:self 901 overscrollActionsController:self
903 didTriggerAction:self.overscrollActionView.selectedAction]; 902 didTriggerAction:self.overscrollActionView.selectedAction];
904 } 903 }
905 904
906 - (void)overscrollActionsView:(OverscrollActionsView*)view 905 - (void)overscrollActionsView:(OverscrollActionsView*)view
907 selectedActionDidChange:(OverscrollAction)newAction { 906 selectedActionDidChange:(OverscrollAction)newAction {
908 TriggerHapticFeedbackForSelectionChange(); 907 TriggerHapticFeedbackForSelectionChange();
909 } 908 }
910 909
911 @end 910 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/omnibox_perftest.mm ('k') | ios/chrome/browser/ui/preload_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698