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

Unified Diff: ios/chrome/browser/ui/ntp/recent_tabs/views/session_tab_data_view.h

Issue 2589803002: Upstream Chrome on iOS source code [6/11]. (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
Index: ios/chrome/browser/ui/ntp/recent_tabs/views/session_tab_data_view.h
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/views/session_tab_data_view.h b/ios/chrome/browser/ui/ntp/recent_tabs/views/session_tab_data_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..872c9d20f2c6d69b37bb848c52cff058d52469c1
--- /dev/null
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/views/session_tab_data_view.h
@@ -0,0 +1,50 @@
+// Copyright 2014 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_BROWSER_UI_NTP_RECENT_TABS_VIEWS_SESSION_TAB_DATA_VIEW_H_
+#define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_VIEWS_SESSION_TAB_DATA_VIEW_H_
+
+#import <UIKit/UIKit.h>
+
+#include "components/sessions/core/tab_restore_service.h"
+
+namespace ios {
+class ChromeBrowserState;
+}
+
+namespace synced_sessions {
+struct DistantTab;
+}
+
+class GURL;
+
+// View displaying a tab's title and favicon.
+@interface SessionTabDataView : UIView
+
+// Designated initializer.
+- (instancetype)initWithFrame:(CGRect)aRect;
+
+// Updates view to display information for the |distantTab| using |browserState|
+// to obtain favicons. |browserState| and |distantTab| must not be nil.
+- (void)updateWithDistantTab:(synced_sessions::DistantTab const*)distantTab
+ browserState:(ios::ChromeBrowserState*)browserState;
+
+// Updates view to display information for the |entry| using |browserState| to
+// obtain favicons. |browserState| and |entry| must not be nil.
+- (void)updateWithTabRestoreEntry:
+ (const sessions::TabRestoreService::Entry*)entry
+ browserState:(ios::ChromeBrowserState*)browserState;
+
+// Updates view to display the |text| and |url| using |browserState| to obtain
+// favicons. |text| and |browserState| must not be nil.
+- (void)setText:(NSString*)text
+ url:(const GURL&)url
+ browserState:(ios::ChromeBrowserState*)browserState;
+
+// Returns the desired height when included in a UITableViewCell.
++ (CGFloat)desiredHeightInUITableViewCell;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_VIEWS_SESSION_TAB_DATA_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698