Commit 4bce11c6 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Creates ios/c/b/ui/recent_tabs. Moves mediator and Coordinator

- Moves the New Mediator and Coordinator files to this new directory.
- Also renames RecentTabsTableCoordinator to RecentTabsCoordinator.

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I7080f890e6232b796db1a3d548ee0f0624b17ec9
Reviewed-on: https://chromium-review.googlesource.com/963846Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544046}
parent 1ab8bfcc
...@@ -388,6 +388,7 @@ source_set("ui_internal") { ...@@ -388,6 +388,7 @@ source_set("ui_internal") {
"//ios/chrome/browser/ui/qr_scanner:coordinator", "//ios/chrome/browser/ui/qr_scanner:coordinator",
"//ios/chrome/browser/ui/qr_scanner/requirements", "//ios/chrome/browser/ui/qr_scanner/requirements",
"//ios/chrome/browser/ui/reading_list", "//ios/chrome/browser/ui/reading_list",
"//ios/chrome/browser/ui/recent_tabs",
"//ios/chrome/browser/ui/sad_tab:coordinator", "//ios/chrome/browser/ui/sad_tab:coordinator",
"//ios/chrome/browser/ui/settings/sync_utils", "//ios/chrome/browser/ui/settings/sync_utils",
"//ios/chrome/browser/ui/signin_interaction/public", "//ios/chrome/browser/ui/signin_interaction/public",
......
...@@ -169,7 +169,6 @@ ...@@ -169,7 +169,6 @@
#import "ios/chrome/browser/ui/new_foreground_tab_fullscreen_disabler.h" #import "ios/chrome/browser/ui/new_foreground_tab_fullscreen_disabler.h"
#import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_controller.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_coordinator.h" #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_coordinator.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator.h"
#import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h" #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h"
#import "ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h" #import "ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h"
#import "ios/chrome/browser/ui/page_info/requirements/page_info_presentation.h" #import "ios/chrome/browser/ui/page_info/requirements/page_info_presentation.h"
...@@ -182,6 +181,7 @@ ...@@ -182,6 +181,7 @@
#import "ios/chrome/browser/ui/reading_list/offline_page_native_content.h" #import "ios/chrome/browser/ui/reading_list/offline_page_native_content.h"
#import "ios/chrome/browser/ui/reading_list/reading_list_coordinator.h" #import "ios/chrome/browser/ui/reading_list/reading_list_coordinator.h"
#import "ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.h" #import "ios/chrome/browser/ui/reading_list/reading_list_menu_notifier.h"
#import "ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.h"
#include "ios/chrome/browser/ui/rtl_geometry.h" #include "ios/chrome/browser/ui/rtl_geometry.h"
#import "ios/chrome/browser/ui/sad_tab/sad_tab_legacy_coordinator.h" #import "ios/chrome/browser/ui/sad_tab/sad_tab_legacy_coordinator.h"
#import "ios/chrome/browser/ui/settings/sync_utils/sync_util.h" #import "ios/chrome/browser/ui/settings/sync_utils/sync_util.h"
...@@ -3145,10 +3145,9 @@ bubblePresenterForFeature:(const base::Feature&)feature ...@@ -3145,10 +3145,9 @@ bubblePresenterForFeature:(const base::Feature&)feature
- (void)createRecentTabsCoordinator { - (void)createRecentTabsCoordinator {
if (experimental_flags::IsRecentTabsUIRebootEnabled()) { if (experimental_flags::IsRecentTabsUIRebootEnabled()) {
// New RecentTabs UIReboot coordinator. // New RecentTabs UIReboot coordinator.
RecentTabsTableCoordinator* recentTabsCoordinator = RecentTabsCoordinator* recentTabsCoordinator = [
[[RecentTabsTableCoordinator alloc] [RecentTabsCoordinator alloc] initWithBaseViewController:self
initWithBaseViewController:self browserState:_browserState];
browserState:_browserState];
recentTabsCoordinator.loader = self; recentTabsCoordinator.loader = self;
recentTabsCoordinator.dispatcher = self.dispatcher; recentTabsCoordinator.dispatcher = self.dispatcher;
self.recentTabsCoordinator = recentTabsCoordinator; self.recentTabsCoordinator = recentTabsCoordinator;
......
...@@ -18,11 +18,7 @@ source_set("recent_tabs") { ...@@ -18,11 +18,7 @@ source_set("recent_tabs") {
"recent_tabs_handset_coordinator.mm", "recent_tabs_handset_coordinator.mm",
"recent_tabs_handset_view_controller.h", "recent_tabs_handset_view_controller.h",
"recent_tabs_handset_view_controller.mm", "recent_tabs_handset_view_controller.mm",
"recent_tabs_mediator.h",
"recent_tabs_mediator.mm",
"recent_tabs_table_consumer.h", "recent_tabs_table_consumer.h",
"recent_tabs_table_coordinator.h",
"recent_tabs_table_coordinator.mm",
"recent_tabs_table_view_controller.h", "recent_tabs_table_view_controller.h",
"recent_tabs_table_view_controller.mm", "recent_tabs_table_view_controller.mm",
"sessions_sync_user_state.h", "sessions_sync_user_state.h",
......
gambard@chromium.org gambard@chromium.org
sczs@chromium.org
# TEAM: ios-directory-owners@chromium.org # TEAM: ios-directory-owners@chromium.org
# OS: iOS # OS: iOS
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "base/logging.h" #include "base/logging.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.h" #import "ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_mediator.h" #import "ios/chrome/browser/ui/recent_tabs/recent_tabs_mediator.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support." #error "This file requires ARC support."
......
# Copyright 2018 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.
source_set("recent_tabs") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"recent_tabs_coordinator.h",
"recent_tabs_coordinator.mm",
"recent_tabs_mediator.h",
"recent_tabs_mediator.mm",
]
deps = [
"//base",
"//components/browser_sync",
"//components/sessions",
"//components/sync",
"//ios/chrome/app/strings",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/sessions",
"//ios/chrome/browser/sync",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/ntp",
"//ios/chrome/browser/ui/ntp/recent_tabs",
"//ios/chrome/browser/ui/table_view",
"//ios/chrome/browser/ui/util",
"//ui/base",
]
allow_circular_includes_from = [ "//ios/chrome/browser/ui/ntp/recent_tabs" ]
}
sczs@chromium.org
gambard@chromium.org
# TEAM: ios-directory-owners@chromium.org
# OS: iOS
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_TABLE_COORDINATOR_H_ #ifndef IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_COORDINATOR_H_
#define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_TABLE_COORDINATOR_H_ #define IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_COORDINATOR_H_
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
@protocol UrlLoader; @protocol UrlLoader;
// Coordinator that presents Recent Tabs. // Coordinator that presents Recent Tabs.
@interface RecentTabsTableCoordinator : ChromeCoordinator @interface RecentTabsCoordinator : ChromeCoordinator
// The dispatcher for this Coordinator. // The dispatcher for this Coordinator.
@property(nonatomic, weak) id<ApplicationCommands, BrowserCommands> dispatcher; @property(nonatomic, weak) id<ApplicationCommands, BrowserCommands> dispatcher;
// URL loader being managed by this Coordinator. // URL loader being managed by this Coordinator.
@property(nonatomic, weak) id<UrlLoader> loader; @property(nonatomic, weak) id<UrlLoader> loader;
@end @end
#endif // IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_TABLE_COORDINATOR_H_ #endif // IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_COORDINATOR_H_
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator.h" #import "ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator.h"
#include "base/ios/block_types.h" #include "base/ios/block_types.h"
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_view_controller.h" #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_handset_view_controller.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_mediator.h"
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.h" #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.h"
#import "ios/chrome/browser/ui/recent_tabs/recent_tabs_mediator.h"
#import "ios/chrome/browser/ui/table_view/table_container_view_controller.h" #import "ios/chrome/browser/ui/table_view/table_container_view_controller.h"
#import "ios/chrome/browser/ui/util/form_sheet_navigation_controller.h" #import "ios/chrome/browser/ui/util/form_sheet_navigation_controller.h"
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// TODO(crbug.com/805135): Remove RecentTabsHandsetViewControllerCommand and // TODO(crbug.com/805135): Remove RecentTabsHandsetViewControllerCommand and
// recent_tabs_handset_view_controller.h import. We need this to dismiss for // recent_tabs_handset_view_controller.h import. We need this to dismiss for
// now, but it can be improved. // now, but it can be improved.
@interface RecentTabsTableCoordinator ()<RecentTabsHandsetViewControllerCommand> @interface RecentTabsCoordinator ()<RecentTabsHandsetViewControllerCommand>
// Completion block called once the recentTabsViewController is dismissed. // Completion block called once the recentTabsViewController is dismissed.
@property(nonatomic, copy) ProceduralBlock completion; @property(nonatomic, copy) ProceduralBlock completion;
// Mediator being managed by this Coordinator. // Mediator being managed by this Coordinator.
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
TableContainerViewController* recentTabsContainerViewController; TableContainerViewController* recentTabsContainerViewController;
@end @end
@implementation RecentTabsTableCoordinator @implementation RecentTabsCoordinator
@synthesize completion = _completion; @synthesize completion = _completion;
@synthesize dispatcher = _dispatcher; @synthesize dispatcher = _dispatcher;
@synthesize loader = _loader; @synthesize loader = _loader;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_MEDIATOR_H_ #ifndef IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_MEDIATOR_H_
#define IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_MEDIATOR_H_ #define IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_MEDIATOR_H_
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
...@@ -42,4 +42,4 @@ class ChromeBrowserState; ...@@ -42,4 +42,4 @@ class ChromeBrowserState;
@property(nonatomic, assign) ios::ChromeBrowserState* browserState; @property(nonatomic, assign) ios::ChromeBrowserState* browserState;
@end @end
#endif // IOS_CHROME_BROWSER_UI_NTP_RECENT_TABS_RECENT_TABS_MEDIATOR_H_ #endif // IOS_CHROME_BROWSER_UI_RECENT_TABS_RECENT_TABS_MEDIATOR_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_mediator.h" #import "ios/chrome/browser/ui/recent_tabs/recent_tabs_mediator.h"
#include "components/browser_sync/profile_sync_service.h" #include "components/browser_sync/profile_sync_service.h"
#include "components/sessions/core/tab_restore_service.h" #include "components/sessions/core/tab_restore_service.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment