blob: 3e0a2692418d6a64bdbe81012a22813c447cd04d [file] [log] [blame]
// 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.
#import <UIKit/UIKit.h>
@protocol PopupMenuViewControllerDelegate;
@protocol PopupMenuViewControllerDelegate;
// ViewController displaying a popup for a menu. The view of this controller is
// a transparent scrim, dismissing the popup if tapped.
@interface PopupMenuViewController : UIViewController
- (instancetype)init NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
- (instancetype)initWithNibName:(NSString*)nibNameOrNil
bundle:(NSBundle*)nibBundleOrNil NS_UNAVAILABLE;
// View containing the content of this popup.
@property(nonatomic, strong, readonly) UIView* contentContainer;
// CommandHandler.
@property(nonatomic, weak) id<PopupMenuViewControllerDelegate> delegate;
// Adds |content| as a child ViewController and its view to the popup.
- (void)addContent:(UIViewController*)content;