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

Unified Diff: ios/chrome/widget_extension/widget_view.mm

Issue 2809173002: Add support in widget to open search modes + copied link in app. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/widget_extension/widget_view.mm
diff --git a/ios/chrome/widget_extension/widget_view.mm b/ios/chrome/widget_extension/widget_view.mm
index d746fd0bf9eb34cd67810f0f14bd055f865d6183..113716858ef78100c29b8501898198cb866b3820 100644
--- a/ios/chrome/widget_extension/widget_view.mm
+++ b/ios/chrome/widget_extension/widget_view.mm
@@ -25,6 +25,8 @@ const CGFloat kFakeboxVerticalPadding = 40;
__weak id<WidgetViewActionTarget> _target;
}
+@property(nonatomic) NSString* copiedLink;
lpromero 2017/04/11 13:24:03 NSString (as NSArray, NSDictionary, etc.) has a mu
lody 2017/04/11 14:38:18 Done.
+@property(nonatomic) UILabel* copiedLinkURLLabel;
lpromero 2017/04/11 13:24:03 Add "strong" to be explicit.
lody 2017/04/11 14:38:18 Done.
@property(nonatomic, weak) UIView* cursor;
// Creates and adds a fake omnibox with blinking cursor to the view and sets the
@@ -35,6 +37,9 @@ const CGFloat kFakeboxVerticalPadding = 40;
@implementation WidgetView
+@synthesize copiedLink = _copiedLink;
+@synthesize copiedLinkURLLabel = _copiedLinkURLLabel;
+
@synthesize cursor = _cursor;
- (instancetype)initWithActionTarget:(id<WidgetViewActionTarget>)target {
@@ -52,7 +57,7 @@ const CGFloat kFakeboxVerticalPadding = 40;
UIGestureRecognizer* tapRecognizer =
[[UITapGestureRecognizer alloc] initWithTarget:_target
- action:@selector(openApp:)];
+ action:@selector(openSearch:)];
[fakebox addGestureRecognizer:tapRecognizer];
[self addSubview:fakebox];
@@ -93,4 +98,9 @@ const CGFloat kFakeboxVerticalPadding = 40;
completion:nil];
}
+- (void)updateCopiedURL:(NSString*)copiedURL {
+ self.copiedLink = copiedURL;
+ self.copiedLinkURLLabel.text = copiedURL;
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698