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

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

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.h
diff --git a/ios/chrome/widget_extension/widget_view.h b/ios/chrome/widget_extension/widget_view.h
index 9e2ff3857c47c8f53740fe8aba20225f592ca5f3..aea02cfe55a34f982aa155810d96fca2ee55f043 100644
--- a/ios/chrome/widget_extension/widget_view.h
+++ b/ios/chrome/widget_extension/widget_view.h
@@ -11,13 +11,22 @@
// view.
@protocol WidgetViewActionTarget
-// Called when the user taps the fake omnibox.
-- (void)openApp:(id)sender;
+// Called when the user taps the Search button.
+- (void)openSearch:(id)sender;
+// Called when the user taps the Incognito Search button.
+- (void)openIncognito:(id)sender;
+// Called when the user taps the Voice Search button.
+- (void)openVoice:(id)sender;
+// Called when the user taps the QR Code button.
+- (void)openQRCode:(id)sender;
+// Called when the user taps the Open Copied Link section.
+- (void)openCopiedLink:(id)sender;
@end
-// View for the widget. Shows a blinking cursor for a fake omnibox and calls the
-// target when tapped.
+// View for the widget. Shows a set of buttons to open the main application in
+// various search modes (regular, incognito, voice, qr code) and optionally a
+// larger area to open the currently copied URL.
lody 2017/04/11 12:56:01 This is a premature comment! I'll revert it in a p
lody 2017/04/11 14:38:18 Done.
@interface WidgetView : UIView
// Designated initializer, creates the widget view with a |target| for user
@@ -27,6 +36,9 @@
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
+// Updates the copied URL.
lpromero 2017/04/11 13:24:03 Above you call it Copied Link. Is it the same conc
lody 2017/04/11 14:38:18 Done.
+- (void)updateCopiedURL:(NSString*)copiedURL;
lpromero 2017/04/11 13:24:03 Can you add unit tests? You could also add Earl Gr
lody 2017/04/11 14:38:18 I will look at adding unit tests in a patch set (f
+
@end
#endif // IOS_CHROME_WIDGET_EXTENSION_WIDGET_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698