OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_TODAY_EXTENSION_NOTIFICATION_CENTER_URL_BUTTON_H_ |
| 6 #define IOS_CHROME_TODAY_EXTENSION_NOTIFICATION_CENTER_URL_BUTTON_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/chrome/today_extension/notification_center_button.h" |
| 11 |
| 12 typedef void (^URLActionBlock)(NSString*); |
| 13 |
| 14 @interface NotificationCenterURLButton : NotificationCenterButton |
| 15 |
| 16 // Create a button with contextual URL layout. |
| 17 - (instancetype)initWithTitle:(NSString*)title |
| 18 url:(NSString*)url |
| 19 icon:(NSString*)icon |
| 20 leftInset:(CGFloat)leftInset |
| 21 block:(URLActionBlock)block; |
| 22 |
| 23 // Show (or hide) a bottom separator below the button. |
| 24 - (void)setSeparatorVisible:(BOOL)visible; |
| 25 |
| 26 // Sets the title and the URL displayed in the button. |
| 27 - (void)setTitle:(NSString*)title url:(NSString*)url; |
| 28 |
| 29 @end |
| 30 |
| 31 #endif // IOS_CHROME_TODAY_EXTENSION_NOTIFICATION_CENTER_URL_BUTTON_H_ |
OLD | NEW |