説明なし

FIRAuthWebViewController.h 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <UIKit/UIKit.h>
  17. @class FIRAuthWebViewController;
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @protocol FIRAuthWebViewControllerDelegate
  20. @brief Defines a delegate for FIRAuthWebViewController
  21. */
  22. @protocol FIRAuthWebViewControllerDelegate <NSObject>
  23. /** @fn webViewController:canHandleURL:
  24. @brief Determines if a URL should be handled by the delegate.
  25. @param URL The URL to handle.
  26. @return Whether the URL could be handled or not.
  27. */
  28. - (BOOL)webViewController:(FIRAuthWebViewController *)webViewController canHandleURL:(NSURL *)URL;
  29. /** @fn webViewControllerDidCancel:
  30. @brief Notifies the delegate that the web view controller is being cancelled by the user.
  31. @param webViewController The web view controller in question.
  32. */
  33. - (void)webViewControllerDidCancel:(FIRAuthWebViewController *)webViewController;
  34. /** @fn webViewController:didFailWithError:
  35. @brief Notifies the delegate that the web view controller failed to load a page.
  36. @param webViewController The web view controller in question.
  37. @param error The error that has occurred.
  38. */
  39. - (void)webViewController:(FIRAuthWebViewController *)webViewController
  40. didFailWithError:(NSError *)error;
  41. @end
  42. /** @class FIRAuthWebViewController
  43. @brief Reponsible for creating a UIViewController for presenting a FIRAutWebView.
  44. */
  45. @interface FIRAuthWebViewController : UIViewController
  46. /** @fn initWithNibName:bundle:
  47. * @brief Please call initWithURL:delegate:
  48. */
  49. - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil
  50. bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
  51. /** @fn initWithCoder:
  52. * @brief Please call initWithURL:delegate:
  53. */
  54. - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
  55. - (instancetype)initWithURL:(NSURL *)URL
  56. delegate:(__weak id<FIRAuthWebViewControllerDelegate>)delegate
  57. NS_DESIGNATED_INITIALIZER;
  58. @end
  59. NS_ASSUME_NONNULL_END