Commit 525a4a22 authored by Dana Fried's avatar Dana Fried Committed by Commit Bot

Revert "[ios] Reduce pointer boilerplate in Credential Provider"

This reverts commit ca2e472b.

Reason for revert: breaks compile, see https://ci.chromium.org/p/chromium/builders/ci/ios-simulator-noncq/4247?

Original change's description:
> [ios] Reduce pointer boilerplate in Credential Provider
> 
> crrev.com/c/2199891 introduces a reusable class for pointer
> interactions for non-button views. This class internally handles
> all the delegate callbacks. So usage is simplified to a single line.
> 
> This CL should have no impact/change on the UI.
> 
> Bug: 1073961
> Change-Id: I28904804916d0c112f73fe6e372bea6aede504d0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199727
> Reviewed-by: Javier Ernesto Flores Robles <javierrobles@chromium.org>
> Commit-Queue: edchin <edchin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#768924}

TBR=edchin@chromium.org,javierrobles@chromium.org

Change-Id: Ib4e9c99203d3dbb673d49f302b342d2055561b3d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1073961
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203138Reviewed-by: default avatarDana Fried <dfried@google.com>
Commit-Queue: Dana Fried <dfried@google.com>
Cr-Commit-Position: refs/heads/master@{#768987}
parent 736e31b6
......@@ -33,7 +33,6 @@ source_set("ui") {
"//ios/chrome/common/credential_provider:ui",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/confirmation_alert",
"//ios/chrome/common/ui/util",
"//ios/chrome/credential_provider_extension:metrics_util",
"//ios/chrome/credential_provider_extension:password_util",
"//ios/chrome/credential_provider_extension:reauthentication_handler",
......
......@@ -8,7 +8,6 @@
#include "ios/chrome/common/app_group/app_group_metrics.h"
#import "ios/chrome/common/credential_provider/credential.h"
#import "ios/chrome/common/ui/colors/semantic_color_names.h"
#import "ios/chrome/common/ui/util/pointer_interaction_util.h"
#import "ios/chrome/credential_provider_extension/metrics_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
......@@ -25,7 +24,7 @@ const CGFloat kHeaderHeight = 70;
#if defined(__IPHONE_13_4)
// This cell just adds a simple hover pointer interaction to the TableViewCell.
@interface CredentialListCell : UITableViewCell
@interface CredentialListCell : UITableViewCell <UIPointerInteractionDelegate>
@end
@implementation CredentialListCell
......@@ -35,12 +34,33 @@ const CGFloat kHeaderHeight = 70;
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
if (@available(iOS 13.4, *)) {
[self addInteraction:[[ViewPointerInteraction alloc] init]];
[self
addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
}
}
return self;
}
#pragma mark UIPointerInteractionDelegate
- (UIPointerRegion*)pointerInteraction:(UIPointerInteraction*)interaction
regionForRequest:(UIPointerRegionRequest*)request
defaultRegion:(UIPointerRegion*)defaultRegion
API_AVAILABLE(ios(13.4)) {
return defaultRegion;
}
- (UIPointerStyle*)pointerInteraction:(UIPointerInteraction*)interaction
styleForRegion:(UIPointerRegion*)region
API_AVAILABLE(ios(13.4)) {
UIPointerHoverEffect* effect = [UIPointerHoverEffect
effectWithPreview:[[UITargetedPreview alloc] initWithView:self]];
effect.prefersScaledContent = NO;
effect.prefersShadow = NO;
return [UIPointerStyle styleWithEffect:effect shape:nil];
}
@end
#endif // defined(__IPHONE_13_4)
@interface CredentialListViewController () <UITableViewDataSource,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment