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

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: remove unnecessary call 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
« no previous file with comments | « ios/chrome/widget_extension/widget_view.h ('k') | ios/chrome/widget_extension/widget_view_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d078fe082c1be8c05196dad6c36c94f96af8e25c 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, copy) NSString* copiedURL;
+@property(nonatomic, strong) UILabel* copiedURLLabel;
@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 copiedURL = _copiedURL;
+@synthesize copiedURLLabel = _copiedURLLabel;
+
@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.copiedURL = copiedURL;
+ self.copiedURLLabel.text = copiedURL;
+}
+
@end
« no previous file with comments | « ios/chrome/widget_extension/widget_view.h ('k') | ios/chrome/widget_extension/widget_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698