New issue
Advanced search Search tips

Issue 777912 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment

Remove WebState::ShouldSuppressDialogs and WebStateObserver::DidSuppressDialog

Project Member Reported by eugene...@chromium.org, Oct 24 2017

Issue description

PreloadController will be a WebStateDelegate for prerender WebStates, so there will be no need for WebState::ShouldSuppressDialogs and WebStateObserver::DidSuppressDialog API.

Instead PreloadController::GetJavaScriptDialogPresenter, PreloadController::OnAuthRequired and PreloadController::CreateNewWebState will cancel the prerender and block dialogs.
 
Sylvain, could you please ping me when PreloadController is refactored, so I will do the clean up in ios/web.
Cc: eugene...@chromium.org
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)
Components: Mobile>iOSWeb
Components: -Mobile>WebView>Glue
Components: -Mobile>iOSWeb Mobile>iOSWeb>PublicAPI
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c41f5e50b9b63b43d50a1b534c415e7ba849239

commit 6c41f5e50b9b63b43d50a1b534c415e7ba849239
Author: Eugene But <eugenebut@chromium.org>
Date: Fri Nov 09 00:39:32 2018

Remove WebState::ShouldSuppressDialogs and WebStateObserver::DidSuppressDialog.

DidSuppressDialog callback is unnecessary because PreloadController
implements CWVWebStateDelegate and can cancel preload on window.open or
showing JS alert.

ShouldSuppressDialogs is unnecessary because PreloadController can
prevent dialogs via CWVWebStateDelegate callbacks.

This CL does not change the behavior. Previously webStateDidSuppressDialog
used to cancel the preload.

Bug:  777912 
Change-Id: Ifbcc6ee48ecee741c2c6ff9a4760d601e3e1b843
Reviewed-on: https://chromium-review.googlesource.com/c/1322358
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606666}
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/crw_test_web_state_observer.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/crw_test_web_state_observer.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/test_web_state.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/test_web_state.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/test_web_state_observer.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/test_web_state_observer.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/test/fakes/test_web_state_observer_util.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/web_state/web_state.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/web_state/web_state_observer.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/public/web_state/web_state_observer_bridge.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/ui/crw_web_controller.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/web_state_impl_unittest.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/web_state_observer_bridge.mm
[modify] https://crrev.com/6c41f5e50b9b63b43d50a1b534c415e7ba849239/ios/web/web_state/web_state_observer_bridge_unittest.mm

Owner: eugene...@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment