[go: nahoru, domu]

blob: 72b476adcc89cd6d8ecc8c8692f35aebf7e59dc1 [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_SAVE_TO_PHOTOS_SAVE_TO_PHOTOS_MEDIATOR_DELEGATE_H_
#define IOS_CHROME_BROWSER_UI_SAVE_TO_PHOTOS_SAVE_TO_PHOTOS_MEDIATOR_DELEGATE_H_
#import <Foundation/Foundation.h>
#import "base/ios/block_types.h"
@class AccountPickerConfiguration;
@protocol SystemIdentity;
// Delegate for the Save to Photos mediator.
@protocol SaveToPhotosMediatorDelegate
// Show and hide the account picker with a given configuration. If the
// `selectedIdentity` is not nil, it will override the value presented by the
// account picker by default.
- (void)showAccountPickerWithConfiguration:
(AccountPickerConfiguration*)configuration
selectedIdentity:(id<SystemIdentity>)selectedIdentity;
- (void)hideAccountPicker;
// Show and hide an alert with "Try Again" and "Cancel" options.
- (void)showTryAgainOrCancelAlertWithTitle:(NSString*)title
message:(NSString*)message
tryAgainTitle:(NSString*)tryAgainTitle
tryAgainAction:(ProceduralBlock)tryAgainAction
cancelTitle:(NSString*)cancelTitle
cancelAction:(ProceduralBlock)cancelAction;
- (void)hideTryAgainOrCancelAlert;
// Show and hide StoreKit.
- (void)showStoreKitWithProductIdentifier:(NSString*)productIdentifer;
- (void)hideStoreKit;
// Show a snackbar with the given `message`, a button with label `buttonText`.
// `messageAction` is called when the button is tapped.
- (void)showSnackbarWithMessage:(NSString*)message
buttonText:(NSString*)buttonText
messageAction:(ProceduralBlock)messageAction
completionAction:(void (^)(BOOL))completionAction;
// Hide Save to Photos UI.
- (void)hideSaveToPhotos;
@end
#endif // IOS_CHROME_BROWSER_UI_SAVE_TO_PHOTOS_SAVE_TO_PHOTOS_MEDIATOR_DELEGATE_H_