OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_PANEL_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_PANEL_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h" |
| 11 |
| 12 namespace ios { |
| 13 class ChromeBrowserState; |
| 14 } |
| 15 |
| 16 @class RecentTabsTableViewController; |
| 17 @protocol UrlLoader; |
| 18 |
| 19 // This is the controller for the Recent Tabs panel on the New Tab Page. |
| 20 // RecentTabsPanelController controls the RecentTabTableViewDataSource, based on |
| 21 // the user's signed-in and chrome-sync states. |
| 22 // |
| 23 // RecentTabsPanelController listens for notifications about Chrome Sync |
| 24 // and ChromeToDevice and changes/updates the view accordingly. |
| 25 // |
| 26 @interface RecentTabsPanelController : NSObject<NewTabPagePanelProtocol> |
| 27 |
| 28 // Public initializer. |
| 29 - (instancetype)initWithLoader:(id<UrlLoader>)loader |
| 30 browserState:(ios::ChromeBrowserState*)browserState; |
| 31 |
| 32 // Private initializer, exposed for testing. |
| 33 - (instancetype)initWithController:(RecentTabsTableViewController*)controller |
| 34 browserState:(ios::ChromeBrowserState*)browserState |
| 35 NS_DESIGNATED_INITIALIZER; |
| 36 |
| 37 - (instancetype)init NS_UNAVAILABLE; |
| 38 |
| 39 // Mark super designated initializer as unavailable. |
| 40 - (instancetype)initWithNibNamed:(NSString*)nibName NS_UNAVAILABLE; |
| 41 |
| 42 // Reloads the closed tab list and updates the content of the tableView. |
| 43 - (void)reloadClosedTabsList; |
| 44 |
| 45 // Reloads the session data and updates the content of the tableView. |
| 46 - (void)reloadSessions; |
| 47 |
| 48 // Sets the tab restore service to null. |
| 49 - (void)tabRestoreServiceDestroyed; |
| 50 |
| 51 @end |
| 52 |
| 53 #endif // IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_PANEL_CONTROLLER_H_ |
OLD | NEW |