| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_WIDGET_EXTENSION_WIDGET_VIEW_H_ | |
| 6 #define IOS_CHROME_WIDGET_EXTENSION_WIDGET_VIEW_H_ | |
| 7 | |
| 8 #import <UIKit/UIKit.h> | |
| 9 | |
| 10 // Protocol to be implemented by targets for user actions coming from the widget | |
| 11 // view. | |
| 12 @protocol WidgetViewActionTarget | |
| 13 | |
| 14 // Called when the user taps the Search button. | |
| 15 - (void)openSearch:(id)sender; | |
| 16 // Called when the user taps the Incognito Search button. | |
| 17 - (void)openIncognito:(id)sender; | |
| 18 // Called when the user taps the Voice Search button. | |
| 19 - (void)openVoice:(id)sender; | |
| 20 // Called when the user taps the QR Code button. | |
| 21 - (void)openQRCode:(id)sender; | |
| 22 // Called when the user taps the Open Copied URL section. | |
| 23 - (void)openCopiedURL:(id)sender; | |
| 24 | |
| 25 @end | |
| 26 | |
| 27 // View for the widget. Shows a blinking cursor for a fake omnibox and calls the | |
| 28 // target when tapped. | |
| 29 @interface WidgetView : UIView | |
| 30 | |
| 31 // Designated initializer, creates the widget view with a |target| for user | |
| 32 // actions. | |
| 33 - (instancetype)initWithActionTarget:(id<WidgetViewActionTarget>)target | |
| 34 NS_DESIGNATED_INITIALIZER; | |
| 35 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; | |
| 36 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; | |
| 37 | |
| 38 // Updates the copied URL. | |
| 39 - (void)updateCopiedURL:(NSString*)copiedURL; | |
| 40 | |
| 41 @end | |
| 42 | |
| 43 #endif // IOS_CHROME_WIDGET_EXTENSION_WIDGET_VIEW_H_ | |
| OLD | NEW |