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

Unified Diff: ios/chrome/today_extension/url_table_cell.h

Issue 2586713002: Upstream code and resources for Chrome on iOS extensions. (Closed)
Patch Set: Created 4 years 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/today_extension/ui_util.mm ('k') | ios/chrome/today_extension/url_table_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/today_extension/url_table_cell.h
diff --git a/ios/chrome/today_extension/url_table_cell.h b/ios/chrome/today_extension/url_table_cell.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3ee347f36b4b7438098b80775854adfb2428093
--- /dev/null
+++ b/ios/chrome/today_extension/url_table_cell.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_TODAY_EXTENSION_URL_TABLE_CELL_H_
+#define IOS_CHROME_TODAY_EXTENSION_URL_TABLE_CELL_H_
+
+#import <UIKit/UIKit.h>
+
+typedef void (^URLActionBlock)(NSString*);
+
+@class PhysicalWebDevice;
+
+// A UITableViewCell containing a NotificationCenterURLButton.
+// The text and url can be set again to allow reuse of button.
+// The icon cannot be changed, so buttons with different icons must use
+// different |reuseIdentifier|.
+@interface URLTableCell : UITableViewCell
+- (instancetype)initWithTitle:(NSString*)title
+ url:(NSString*)url
+ icon:(NSString*)icon
+ leftInset:(CGFloat)leftInset
+ reuseIdentifier:(NSString*)reuseIdentifier
+ block:(URLActionBlock)block;
+
+// Sets the title and url of the button. The unescaped URL will be used as
+// subtitle and passed as a parameter to the block.
+- (void)setTitle:(NSString*)title url:(NSString*)url;
+
+// Show (or hide) a bottom separator below the button.
+// The separator is handled manually as it is not possible to hide only the last
+// separator in UITableView.
+- (void)setSeparatorVisible:(BOOL)visible;
+
+@end
+
+#endif // IOS_CHROME_TODAY_EXTENSION_URL_TABLE_CELL_H_
« no previous file with comments | « ios/chrome/today_extension/ui_util.mm ('k') | ios/chrome/today_extension/url_table_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698