Commit 810f9320 authored by edchin's avatar edchin Committed by Commit Bot

[ios] Remove rootViewController from /ntp/recent_tabs

Bug: 790925
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I088f7463061937cf9925284f5270568485ee0278
Reviewed-on: https://chromium-review.googlesource.com/802761
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521027}
parent 0806cebf
......@@ -40,6 +40,7 @@ source_set("recent_tabs") {
"//ios/chrome/browser/ui/ntp/recent_tabs/views",
"//ios/chrome/browser/ui/settings/sync_utils",
"//ios/chrome/browser/ui/signin_interaction/public",
"//ios/chrome/browser/ui/util",
"//ios/web",
"//ui/base",
"//url",
......
......@@ -42,6 +42,7 @@
#include "ios/chrome/browser/ui/ui_util.h"
#import "ios/chrome/browser/ui/url_loader.h"
#import "ios/chrome/browser/ui/util/constraints_ui_util.h"
#import "ios/chrome/browser/ui/util/top_view_controller.h"
#include "ios/chrome/grit/ios_chromium_strings.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ios/web/public/referrer.h"
......@@ -629,9 +630,9 @@ enum CellType {
params.view.reset(self.tableView);
// Present sheet/popover using controller that is added to view hierarchy.
UIViewController* topController = [params.view window].rootViewController;
while (topController.presentedViewController)
topController = topController.presentedViewController;
// TODO(crbug.com/754642): Remove TopPresentedViewController().
UIViewController* topController =
top_view_controller::TopPresentedViewController();
_contextMenuCoordinator =
[[ContextMenuCoordinator alloc] initWithBaseViewController:topController
......
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