1 // Copyright 2018 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 #ifndef IOS_CHROME_BROWSER_UI_AUTOFILL_MANUAL_FILL_MANUAL_FILL_PASSWORD_COORDINATOR_H_ 6 #define IOS_CHROME_BROWSER_UI_AUTOFILL_MANUAL_FILL_MANUAL_FILL_PASSWORD_COORDINATOR_H_ 7 8 #import "ios/chrome/browser/ui/autofill/manual_fill/fallback_coordinator.h" 9 10 class GURL; 11 12 // Delegate for the coordinator actions. 13 @protocol PasswordCoordinatorDelegate <FallbackCoordinatorDelegate> 14 15 // Opens the passwords settings. 16 - (void)openPasswordSettings; 17 18 // Opens the all passwords picker, used for manual fallback. 19 - (void)openAllPasswordsPicker; 20 21 @end 22 23 // Creates and manages a view controller to present passwords to the user. It 24 // will filter the passwords based on the passed URL when instantiating it. Any 25 // selected password will be sent to the current field in the active web state. 26 @interface ManualFillPasswordCoordinator : FallbackCoordinator 27 28 // The delegate for this coordinator. Delegate protocol conforms to 29 // FallbackCoordinatorDelegate, and replaces the superclass delegate. 30 @property(nonatomic, weak) id<PasswordCoordinatorDelegate> delegate; 31 32 // Creates a coordinator that uses a |viewController|, |browser|, 33 // |URL| and an |injectionHandler|. 34 - (instancetype)initWithBaseViewController:(UIViewController*)viewController 35 browser:(Browser*)browser 36 URL:(const GURL&)URL 37 injectionHandler: 38 (ManualFillInjectionHandler*)injectionHandler 39 NS_DESIGNATED_INITIALIZER; 40 41 // Unavailable, use 42 // -initWithBaseViewController:browser:URL:injectionHandler:. 43 - (instancetype)initWithBaseViewController:(UIViewController*)viewController 44 browser:(Browser*)browser 45 injectionHandler: 46 (ManualFillInjectionHandler*)injectionHandler 47 NS_UNAVAILABLE; 48 49 // Presents the password view controller as a popover from the passed button. 50 - (void)presentFromButton:(UIButton*)button; 51 52 @end 53 54 #endif // IOS_CHROME_BROWSER_UI_AUTOFILL_MANUAL_FILL_MANUAL_FILL_PASSWORD_COORDINATOR_H_ 55