cwv_lookalike_url_handler_internal.h 1.1 KB

12345678910111213141516171819202122232425262728
  1. // Copyright 2022 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. #ifndef IOS_WEB_VIEW_INTERNAL_CWV_LOOKALIKE_URL_HANDLER_INTERNAL_H_
  5. #define IOS_WEB_VIEW_INTERNAL_CWV_LOOKALIKE_URL_HANDLER_INTERNAL_H_
  6. #import "base/callback.h"
  7. #import "ios/components/security_interstitials/lookalikes/lookalike_url_container.h"
  8. #import "ios/web/public/web_state.h"
  9. #import "ios/web_view/public/cwv_lookalike_url_handler.h"
  10. @interface CWVLookalikeURLHandler ()
  11. // Designated initializer.
  12. // |webState| The associated web state.
  13. // |lookalikeURLInfo| Encapsulates information about the lookalike URL.
  14. // |htmlCallback| A callback that can be used to display an interstitial page.
  15. - (instancetype)
  16. initWithWebState:(web::WebState*)webState
  17. lookalikeURLInfo:(std::unique_ptr<LookalikeUrlContainer::LookalikeUrlInfo>)
  18. lookalikeURLInfo
  19. htmlCallback:(base::OnceCallback<void(NSString*)>)htmlCallback
  20. NS_DESIGNATED_INITIALIZER;
  21. @end
  22. #endif // IOS_WEB_VIEW_INTERNAL_CWV_LOOKALIKE_URL_HANDLER_INTERNAL_H_