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

Side by Side Diff: ios/chrome/browser/ui/util/top_view_controller.mm

Issue 2580333003: Upstream Chrome on iOS source code [10/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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #import "ios/chrome/browser/ui/util/top_view_controller.h"
6
7 namespace top_view_controller {
8
9 UIViewController* TopPresentedViewController() {
10 return TopPresentedViewControllerFrom(
11 [[UIApplication sharedApplication] keyWindow].rootViewController);
12 }
13 UIViewController* TopPresentedViewControllerFrom(
14 UIViewController* base_view_controller) {
15 UIViewController* topController = base_view_controller;
16 for (UIViewController* controller = [topController presentedViewController];
17 controller && ![controller isBeingDismissed];
18 controller = [controller presentedViewController]) {
19 topController = controller;
20 }
21 return topController;
22 }
23
24 } // namespace top_view_controller
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/util/top_view_controller.h ('k') | ios/chrome/browser/ui/util/transparent_link_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698