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

Side by Side Diff: ios/chrome/browser/ui/stack_view/stack_view_controller.mm

Issue 2952433002: Fix tab presentation metrics (Closed)
Patch Set: 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
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller.mm ('k') | 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/stack_view/stack_view_controller.h" 5 #import "ios/chrome/browser/ui/stack_view/stack_view_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 CGPointMake(CGRectGetMidX(viewBounds), CGRectGetMidY(viewBounds)); 2077 CGPointMake(CGRectGetMidX(viewBounds), CGRectGetMidY(viewBounds));
2078 [self.view addSubview:newCard]; 2078 [self.view addSubview:newCard];
2079 2079
2080 void (^completionBlock)(void) = ^{ 2080 void (^completionBlock)(void) = ^{
2081 [newCard removeFromSuperview]; 2081 [newCard removeFromSuperview];
2082 [[_scrollView layer] setShouldRasterize:NO]; 2082 [[_scrollView layer] setShouldRasterize:NO];
2083 [_delegate tabSwitcherDismissTransitionDidEnd:self]; 2083 [_delegate tabSwitcherDismissTransitionDidEnd:self];
2084 double duration = [NSDate timeIntervalSinceReferenceDate] - startTime; 2084 double duration = [NSDate timeIntervalSinceReferenceDate] - startTime;
2085 if (_activeCardSet.tabModel.isOffTheRecord) { 2085 if (_activeCardSet.tabModel.isOffTheRecord) {
2086 UMA_HISTOGRAM_TIMES( 2086 UMA_HISTOGRAM_TIMES(
2087 "Toolbar.TabSwitcher.NewIncognitoTabPresentationDurationn", 2087 "Toolbar.TabSwitcher.NewIncognitoTabPresentationDuration",
2088 base::TimeDelta::FromSecondsD(duration)); 2088 base::TimeDelta::FromSecondsD(duration));
2089 } else { 2089 } else {
2090 UMA_HISTOGRAM_TIMES("Toolbar.TabSwitcher.NewTabPresentationDuration", 2090 UMA_HISTOGRAM_TIMES("Toolbar.TabSwitcher.NewTabPresentationDuration",
2091 base::TimeDelta::FromSecondsD(duration)); 2091 base::TimeDelta::FromSecondsD(duration));
2092 } 2092 }
2093 }; 2093 };
2094 2094
2095 CGPoint origin = _lastTapPoint; 2095 CGPoint origin = _lastTapPoint;
2096 _lastTapPoint = CGPointZero; 2096 _lastTapPoint = CGPointZero;
2097 ios_internal::page_animation_util::AnimateInPaperWithAnimationAndCompletion( 2097 ios_internal::page_animation_util::AnimateInPaperWithAnimationAndCompletion(
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 3516
3517 @end 3517 @end
3518 3518
3519 @implementation StackViewController (Testing) 3519 @implementation StackViewController (Testing)
3520 3520
3521 - (UIScrollView*)scrollView { 3521 - (UIScrollView*)scrollView {
3522 return _scrollView.get(); 3522 return _scrollView.get();
3523 } 3523 }
3524 3524
3525 @end 3525 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698