New issue
Advanced search Search tips

Issue 674991 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task

Blocked on:
issue 820201
issue 692331
issue 713836
issue 725985
issue 780646
issue 850760

Blocking:
issue 616244
issue 620438



Sign in to add a comment

Remove CRWWebDelegate protocol

Project Member Reported by eugene...@chromium.org, Dec 16 2016

Issue description

CRWWebDelegate should be fully replaced by WebStateDelegate.
 
Blockedon: 616244
Blockedon: -616244
Blocking: 616244
Labels: -Type-Bug Type-Feature
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 9 2017

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

commit 75a06fa7347a84e1e2f1261e30b0f7dfa7b70971
Author: eugenebut <eugenebut@chromium.org>
Date: Mon Jan 09 17:09:55 2017

[ios] Removed -[CRWWebDelegate openURLWithParams:].

Replaced this method with WebStateDelegate::OpenURLFromWebState which
mirrors WebContentsDelegate::OpenURLFromTab.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2614023006
Cr-Commit-Position: refs/heads/master@{#442275}

[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/public/web_state/web_state_delegate.h
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/public/web_state/web_state_delegate_bridge.h
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/web_state/web_state_delegate.mm
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/web_state/web_state_delegate_bridge.mm
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/web_state/web_state_delegate_bridge_unittest.mm
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/web_state/web_state_delegate_stub.h
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/web_state/web_state_delegate_stub.mm
[modify] https://crrev.com/75a06fa7347a84e1e2f1261e30b0f7dfa7b70971/ios/web/web_state/web_state_impl.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 10 2017

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

commit 25371c65e843d76f82b0a828a71859c3862b9b3e
Author: eugenebut <eugenebut@chromium.org>
Date: Tue Jan 10 14:03:37 2017

[ios] Removed webDidFinishWithURL:loadSuccess: from CRWWebDelegate.

Notable changes:
 - Tab now conforms to CRWWebStateObserver
 - Tab implements didFinishWithURL:loadSuccess: instead of
   webDidFinishWithURL:loadSuccess:
 - CRWWebController calls SetIsLoading(false) first and then
   OnPageLoaded (this way IsLoading returns false inside
   didFinishWithURL:loadSuccess:)

BUG= 674991 

Review-Url: https://codereview.chromium.org/2619383002
Cr-Commit-Position: refs/heads/master@{#442574}

[modify] https://crrev.com/25371c65e843d76f82b0a828a71859c3862b9b3e/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/25371c65e843d76f82b0a828a71859c3862b9b3e/ios/chrome/browser/tabs/tab_unittest.mm
[modify] https://crrev.com/25371c65e843d76f82b0a828a71859c3862b9b3e/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/25371c65e843d76f82b0a828a71859c3862b9b3e/ios/web/web_state/ui/crw_web_controller.mm

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 18 2017

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

commit 4f2c57e57018d7c3b19c877171a062fd1508a0f6
Author: eugenebut <eugenebut@chromium.org>
Date: Wed Jan 18 16:15:38 2017

Added -[Tab webState:didCommitNavigationWithDetails:].

Moved most of -[Tab webDidStartLoadingURL:shouldUpdateHistory:] to this
new method. |didCommitNavigationWithDetails:| is called right before
|webDidStartLoadingURL:shouldUpdateHistory:|, so this CL should not
change the logic.

|webDidStartLoadingURL:shouldUpdateHistory:| is a part of deprecated
CRWWebDelegate and should be fully removed in a separate CL.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2643493002
Cr-Commit-Position: refs/heads/master@{#444381}

[modify] https://crrev.com/4f2c57e57018d7c3b19c877171a062fd1508a0f6/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/4f2c57e57018d7c3b19c877171a062fd1508a0f6/ios/chrome/browser/tabs/tab_unittest.mm

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 18 2017

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

commit b721caa478257949628e2eda07bb1dd9588285ad
Author: eugenebut <eugenebut@chromium.org>
Date: Wed Jan 18 16:18:11 2017

Implemented FormResubmissionTabHelper.

FormResubmissionTabHelper fully encapsulates the logic of Form
Resubmission dialog presentation so this code can be moved to
WebStateDelegate.

Previously Resubmission Dialog was dismissed in
webWillAddPendingURL:transition: callback. With this change dismissal happens
after provisional navigation is started which should not make any noticeable
difference in app behavior.

BUG= 674991 ,681867

Review-Url: https://codereview.chromium.org/2642463002
Cr-Commit-Position: refs/heads/master@{#444382}

[modify] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/chrome/browser/web/BUILD.gn
[add] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/chrome/browser/web/form_resubmission_tab_helper.h
[add] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/chrome/browser/web/form_resubmission_tab_helper.mm
[add] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/chrome/browser/web/form_resubmission_tab_helper_unittest.mm
[modify] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/web/public/test/fakes/test_web_state.h
[modify] https://crrev.com/b721caa478257949628e2eda07bb1dd9588285ad/ios/web/public/test/fakes/test_web_state.mm

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 19 2017

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

commit 0804ab91e011cdf3c20f0ca837222d8f3414a72a
Author: eugenebut <eugenebut@chromium.org>
Date: Thu Jan 19 16:07:26 2017

Send CrashReporting notification from didCommitNavigationWithDetails:.

This notification was previously sent from deprecated
webDidStartLoadingURL:shouldUpdateHistory: method, which should be
removed.

After this CL notification is now sent before |countMainFrameLoad| and
|addCurrentEntryToHistoryDB| calls, which should not cause any issues
as calls order should not matter.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2644643003
Cr-Commit-Position: refs/heads/master@{#444749}

[modify] https://crrev.com/0804ab91e011cdf3c20f0ca837222d8f3414a72a/ios/chrome/browser/tabs/tab.mm

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 19 2017

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

commit 17c4a6c7ae7563f44594e6fd509f78bcd3d42323
Author: eugenebut <eugenebut@chromium.org>
Date: Thu Jan 19 16:08:40 2017

Replaced webControllerWebProcessDidCrash: with RenderProcessGone.

webControllerWebProcessDidCrash: is a deprecated method from
CRWWebDelegate protocol. RenderProcessGone mirrors WebContentsDelegate
method with the same name.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2645783002
Cr-Commit-Position: refs/heads/master@{#444750}

[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/public/web_state/web_state_observer.h
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/public/web_state/web_state_observer_bridge.h
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/17c4a6c7ae7563f44594e6fd509f78bcd3d42323/ios/web/web_state/web_state_observer_bridge.mm

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 25 2017

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

commit b739bdcc12b1d4da4e614fe153cb05cd3b9e6104
Author: eugenebut <eugenebut@chromium.org>
Date: Wed Jan 25 06:32:48 2017

Removed Form Resubmission callback from CRWWebUserInterfaceDelegate.

Use WebStateDelegate::ShowRepostFormWarningDialog callback instead to
mirror WebContentsDelegate API.

BUG= 674991 
TEST=Forms Resubmissions work correctly.

Review-Url: https://codereview.chromium.org/2642233004
Cr-Commit-Position: refs/heads/master@{#445971}

[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/public/test/fakes/test_web_state_delegate.h
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/public/test/fakes/test_web_state_delegate.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/public/web_state/web_state_delegate.h
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/public/web_state/web_state_delegate_bridge.h
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_delegate.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_delegate_bridge.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_delegate_bridge_unittest.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_delegate_stub.h
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_delegate_stub.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/b739bdcc12b1d4da4e614fe153cb05cd3b9e6104/ios/web/web_state/web_state_impl_unittest.mm

Status: Started (was: Assigned)
Blockedon: 692331
Project Member

Comment 14 by bugdroid1@chromium.org, Feb 21 2017

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

commit 91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22
Author: eugenebut <eugenebut@chromium.org>
Date: Tue Feb 21 16:40:31 2017

Refactored callbacks for opening a new window.

This CL replaces 4 callbacks:
 webPageOrderedOpen:referrer:windowName:inBackground:
 webPageOrderedOpen
 webController:shouldBlockPopupWithURL:sourceURL:
 webController:didBlockPopup:

with a single callback:
 webController:createWebControllerForURL:openerURL:initiatedByUser:

This makes ios code more similar to other platforms where windows
are open via single WebContentsDelegate::AddNewContents callback
and all popup blocking logic lives in chrome layer.

This is a precursory CL to move window opening callback to
WebStateDelegate.

BUG= 622072 , 674991 

Review-Url: https://codereview.chromium.org/2692803004
Cr-Commit-Position: refs/heads/master@{#451778}

[modify] https://crrev.com/91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22/ios/web/web_state/js/resources/core.js
[modify] https://crrev.com/91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/91cfb3ad9a9b9502aed2f9bc76c5d3cc96105f22/ios/web/web_state/ui/crw_web_controller_unittest.mm

Project Member

Comment 15 by bugdroid1@chromium.org, Feb 28 2017

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

commit 4d5a0d2b7b8076634bbb9efd7f3da647ca04867f
Author: eugenebut <eugenebut@chromium.org>
Date: Tue Feb 28 02:38:30 2017

Removed -[CRWWebDelegate webController:titleDidChange:].

Replaced with WebStateObserver::TitleWasSet callback which mirrors
content API.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2710913006
Cr-Commit-Position: refs/heads/master@{#453473}

[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/chrome/browser/tabs/tab_unittest.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/public/test/fakes/crw_test_web_state_observer.h
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/public/test/fakes/crw_test_web_state_observer.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/public/web_state/web_state_observer.h
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/public/web_state/web_state_observer_bridge.h
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/web_state_impl_unittest.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/web_state_observer_bridge.mm
[modify] https://crrev.com/4d5a0d2b7b8076634bbb9efd7f3da647ca04867f/ios/web/web_state/web_state_observer_bridge_unittest.mm

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 9 2017

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

commit 275f589e57013bde8a1626a6ef8a9c3aa181eef9
Author: eugenebut <eugenebut@chromium.org>
Date: Thu Mar 09 22:20:51 2017

Moved window opening callback to WebStateDelegate.

This partially mirrors content which also has window opening callback in
WebContentsDelegate. The difference is that in content WebContents is
created by content and in web WebState is created by chrome.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2737943003
Cr-Commit-Position: refs/heads/master@{#455881}

[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/test/crw_mock_web_state_delegate.h
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/test/crw_mock_web_state_delegate.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/test/fakes/test_web_state_delegate.h
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/test/fakes/test_web_state_delegate.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/web_state/web_state_delegate.h
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/public/web_state/web_state_delegate_bridge.h
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/web_state_delegate.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/web_state_delegate_bridge.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/web_state_delegate_bridge_unittest.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/275f589e57013bde8a1626a6ef8a9c3aa181eef9/ios/web/web_state/web_state_impl_unittest.mm

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 14 2017

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

commit b46b2120bd9c8b260513015717a9a09792f71714
Author: eugenebut <eugenebut@chromium.org>
Date: Tue Mar 14 02:43:26 2017

Replaced webPageOrderedClose with WebStateDelegate API.

New WebStateDelegate::CloseWebState mirrors content's
WebContents::CloseContents.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2737353006
Cr-Commit-Position: refs/heads/master@{#456588}

[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/chrome/browser/tabs/tab_private.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/test/crw_mock_web_state_delegate.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/test/crw_mock_web_state_delegate.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/test/fakes/test_web_state_delegate.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/test/fakes/test_web_state_delegate.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/web_state/web_state_delegate.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/public/web_state/web_state_delegate_bridge.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/web_state_delegate.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/web_state_delegate_bridge.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/web_state_delegate_bridge_unittest.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/b46b2120bd9c8b260513015717a9a09792f71714/ios/web/web_state/web_state_impl_unittest.mm

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 15 2017

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

commit 4cc620ab46c8194efedfd1d78e7159d5968d692b
Author: eugenebut <eugenebut@chromium.org>
Date: Wed Mar 15 19:19:41 2017

Removed CRWWebDelagate callbacks for load cancellation.

When load is cancelled Tab already receives webStateDidStopLoading:.
In that callback it is safe to call |enableFullScreen| because the page
will not continue loading and fullscreen can be allowed.

webStateDidStopLoading: enables fullscreen and notifies tab model that
tab was changes. This allows removing deprecated
|webCancelStartLoadingRequest| and |webLoadCancelled:|.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2736383006
Cr-Commit-Position: refs/heads/master@{#457162}

[modify] https://crrev.com/4cc620ab46c8194efedfd1d78e7159d5968d692b/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/4cc620ab46c8194efedfd1d78e7159d5968d692b/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/4cc620ab46c8194efedfd1d78e7159d5968d692b/ios/web/web_state/ui/crw_web_controller.mm

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 15 2017

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

commit 2cb5737f8749a43688c6bcb08f207176409fcae3
Author: eugenebut <eugenebut@chromium.org>
Date: Wed Mar 15 20:01:33 2017

Removed webControllerDidUpdateSSLStatusForCurrentNavigationItem:.

Replaced with WebStateDelegate::DidChangeVisibleSecurityState which
mirrors content API.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2752013002
Cr-Commit-Position: refs/heads/master@{#457178}

[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/test/fakes/crw_test_web_state_observer.h
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/test/fakes/crw_test_web_state_observer.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/test/fakes/test_web_state_observer.h
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/test/fakes/test_web_state_observer.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/test/fakes/test_web_state_observer_util.h
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/web_state/web_state_observer.h
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/public/web_state/web_state_observer_bridge.h
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/web_state_impl_unittest.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/web_state_observer_bridge.mm
[modify] https://crrev.com/2cb5737f8749a43688c6bcb08f207176409fcae3/ios/web/web_state/web_state_observer_bridge_unittest.mm

Project Member

Comment 20 by bugdroid1@chromium.org, Mar 16 2017

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

commit 848ad70823991e0f12b437d789943a4ab24d65bb
Author: eugenebut <eugenebut@chromium.org>
Date: Thu Mar 16 21:41:12 2017

Removed webControllerDidUpdateSSLStatusForCurrentNavigationItem:.

API usage was removed here: https://codereview.chromium.org/2752013002/

BUG= 674991 

Review-Url: https://codereview.chromium.org/2756013002
Cr-Commit-Position: refs/heads/master@{#457567}

[modify] https://crrev.com/848ad70823991e0f12b437d789943a4ab24d65bb/ios/web/public/web_state/ui/crw_web_delegate.h

Project Member

Comment 21 by bugdroid1@chromium.org, Mar 17 2017

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

commit e1886452ae27293d06b04655ccae3a25811d62e6
Author: eugenebut <eugenebut@chromium.org>
Date: Fri Mar 17 14:45:51 2017

Removed webControllerDidSuppressDialog: callback.

Replaced with WebStateObserver::DidSuppressDialog callback.

In content dialogs suppression is implemented via a single callback:
WebContentsDelegate::ShouldSuppressDialogs. This callback is called
before showing a dialog.

On iOS implementing the same API would require a roundtrip
(JS->Native->JS). This is because WKWebView does not provide any
callbacks for showing geolocation dialogs. So on iOS dialogs blocking is
implemented in JS as a boolean flag which is set by
WebState::SetShouldSuppressDialogs. Embedder still needs a callback to
know if the dialog was suppressed which is implemented as
WebStateObserver::DidSuppressDialog and require only one JS->Native
message.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2755013002
Cr-Commit-Position: refs/heads/master@{#457764}

[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/test/fakes/crw_test_web_state_observer.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/test/fakes/crw_test_web_state_observer.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/test/fakes/test_web_state_observer.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/test/fakes/test_web_state_observer.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/test/fakes/test_web_state_observer_util.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/web_state/web_state.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/web_state/web_state_observer.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/public/web_state/web_state_observer_bridge.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/ui/crw_web_controller.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/web_state_impl_unittest.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/web_state_observer_bridge.mm
[modify] https://crrev.com/e1886452ae27293d06b04655ccae3a25811d62e6/ios/web/web_state/web_state_observer_bridge_unittest.mm

Project Member

Comment 22 by bugdroid1@chromium.org, Apr 4 2017

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

commit 72543a7b6abcd436594bbe771ba1e4b39e29df67
Author: eugenebut <eugenebut@chromium.org>
Date: Tue Apr 04 20:02:59 2017

Removed -[CRWWebDelegate webWillInitiateLoadWithParams:].

Method implementation was moved into
|webDidUpdateSessionForLoadWithParams:wasInitialNavigation:| which is
also called from -[CRWWebController loadWithParams:]. This is done, because
WebStateObserver will have only one DidStartNavigation callback to avoid extra
API complexity.

This slightly changes the logic of marking the next crash as non-startup crash.
After this change if app crashes during adding the pending entry, the crash will be
marked as a startup crash, which should not make any practical different for the user.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2780403003
Cr-Commit-Position: refs/heads/master@{#461807}

[modify] https://crrev.com/72543a7b6abcd436594bbe771ba1e4b39e29df67/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/72543a7b6abcd436594bbe771ba1e4b39e29df67/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/72543a7b6abcd436594bbe771ba1e4b39e29df67/ios/web/web_state/ui/crw_web_controller.mm

Labels: -Type-Feature Type-Task
Blockedon: 713836
Project Member

Comment 25 by bugdroid1@chromium.org, May 23 2017

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

commit 824fafed7f2df416a77d464dea6dff39bcb73407
Author: eugenebut <eugenebut@chromium.org>
Date: Tue May 23 16:18:45 2017

Added web::NavigationContext::GetPageTransition.

This API will allow to use DidStartNavigation callback instead of
deprecated -[CRWWebDelegate webWillReload].
DidStartNavigation will check if NavigationContext::GetPageTransition
returns reload transition to act on reload navigation.

BUG= 674991 

Review-Url: https://codereview.chromium.org/2896623003
Cr-Commit-Position: refs/heads/master@{#473927}

[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/chrome/browser/tabs/tab_unittest.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/public/test/fakes/crw_test_web_state_observer.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/public/test/fakes/test_web_state_observer.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/public/web_state/navigation_context.h
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/test/web_int_test.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/navigation_callbacks_inttest.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/navigation_context_impl.h
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/navigation_context_impl.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/navigation_context_impl_unittest.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/ui/crw_wk_navigation_states_unittest.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/web_state_impl_unittest.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/web_state/web_state_observer_bridge_unittest.mm
[modify] https://crrev.com/824fafed7f2df416a77d464dea6dff39bcb73407/ios/web/webui/crw_web_ui_manager_unittest.mm

Blockedon: 725985
Project Member

Comment 27 by bugdroid1@chromium.org, Jul 27 2017

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

commit 39e0e6cef3739dd7e9f35c66e8f74e56d1aafa4a
Author: Eugene But <eugenebut@google.com>
Date: Thu Jul 27 22:47:10 2017

Moved set isVoiceSearchResultsTab to NO in DidStartNavigation.

This call was moved from deprecated CRWWebDelegate callbacks to
WebStateObserver callback.

Bug:  674991 
Change-Id: Ifbde934f8760bfd67ebbe6faf33f7ecad90da094
Reviewed-on: https://chromium-review.googlesource.com/588052
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490032}
[modify] https://crrev.com/39e0e6cef3739dd7e9f35c66e8f74e56d1aafa4a/ios/chrome/browser/tabs/tab.mm

Project Member

Comment 28 by bugdroid1@chromium.org, Oct 18 2017

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

commit 0c685566b7416262e378167b2015b55d05853e40
Author: Eugene But <eugenebut@google.com>
Date: Wed Oct 18 00:10:19 2017

Call RecordPageLoadStart from DidStartNavigation WSO callback.

Before this CL RecordPageLoadStart was called from deprecated
CRWWebDelegate callbacks:
 - webWillAddPendingURL:transition:
 - webDidUpdateSessionForLoadWithURL:
 
RecordPageLoadStart is called for the following navigations:
 - typed navigation
 - link clicks
 - bookmark 
 - form submission
 - switching user agent type
 
RecordPageLoadStart is NOT called for the following navigations:
 - back forward navigation
 - client redirect
 - reload
 - opening NTP
 - opening a child window and loading URL there
 - preload tabs

Bug:  674991 
Change-Id: I70d53f7e18faf8da151ae1dde35037bad124eb09
Reviewed-on: https://chromium-review.googlesource.com/707659
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: Gregory Chatzinoff <gchatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509614}
[modify] https://crrev.com/0c685566b7416262e378167b2015b55d05853e40/ios/chrome/browser/tabs/tab.mm

Blockedon: 780646
Project Member

Comment 30 by bugdroid1@chromium.org, Nov 6 2017

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

commit 9a585f59cb45424bb0aea4279fcc15dcc695109a
Author: Eugene But <eugenebut@chromium.org>
Date: Mon Nov 06 17:40:13 2017

Removed -[CRWWebController webWillAddPendingURL:transition:].

This method is not implemented anymore.

TBR=gchatz@chromium.org

Bug:  674991 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ic57296f72aa085a6652f3972510ef7093167ee80
Reviewed-on: https://chromium-review.googlesource.com/753438
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514165}
[modify] https://crrev.com/9a585f59cb45424bb0aea4279fcc15dcc695109a/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/9a585f59cb45424bb0aea4279fcc15dcc695109a/ios/chrome/browser/tabs/tab_unittest.mm
[modify] https://crrev.com/9a585f59cb45424bb0aea4279fcc15dcc695109a/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/9a585f59cb45424bb0aea4279fcc15dcc695109a/ios/web/web_state/ui/crw_web_controller.mm

Project Member

Comment 31 by bugdroid1@chromium.org, Dec 7 2017

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

commit d644f802d97cd6745bc070a1401211e06938ce72
Author: Eugene But <eugenebut@chromium.org>
Date: Thu Dec 07 22:54:43 2017

Moved Safe Mode code to DidStartNavigation.

Moved from webDidUpdateSessionForLoadWithURL: to didStartNavigation:.
didStartNavigation: is executed a little bit later than previous
callback, which makes app returning from safe mode a little bit later.

This difference will allow to execute more code in safe mode, but will
not affect the users, because the delay between old and new callback
is not visually distinguishable.

webDidUpdateSessionForLoadWithURL: callbacks is a part of deprecated
CRWWebDelegate and should be removed. Placing safe more code into
DidStartNavigation allows moving this code from Tab to TabHelper in
the future.

Bug:  674991 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I3a67ad75806aaa65c00ba45bbe6a3b99f749290d
Reviewed-on: https://chromium-review.googlesource.com/811344
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522590}
[modify] https://crrev.com/d644f802d97cd6745bc070a1401211e06938ce72/ios/chrome/browser/tabs/tab.mm

Project Member

Comment 32 by bugdroid1@chromium.org, Dec 11 2017

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

commit cd291f4c1ce16e3c6f8cc24fe6c0298214f3bd4d
Author: Eugene But <eugenebut@google.com>
Date: Mon Dec 11 17:25:11 2017

Moved addLocationToNavigationItem to DidStartNavigatation.

DidStartNavigation is called more often than
webDidUpdateSessionForLoadWithURL, which is not a problem in practice.

OmniboxGeolocationController checks every navigation item for update
eligibility, so this CL does not cause any functional changes.

Bug:  674991 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I49a23342e41463766791adc2a7d7edafba2b1575
Reviewed-on: https://chromium-review.googlesource.com/818082
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523119}
[modify] https://crrev.com/cd291f4c1ce16e3c6f8cc24fe6c0298214f3bd4d/ios/chrome/browser/tabs/tab.mm

Project Member

Comment 33 by bugdroid1@chromium.org, Dec 13 2017

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

commit 68bfa35d85cb256eb9cff85c9992999fb3566cb8
Author: Eugene But <eugenebut@google.com>
Date: Wed Dec 13 17:25:59 2017

Removed webDidUpdateSessionForLoadWithURL: callback.

This was deprecated method from CRWWebDelegate which is not used
anymore.

Bug:  674991 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ie06ae35173b03681a49625272aa0ec8c2a38265f
Reviewed-on: https://chromium-review.googlesource.com/820934
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523801}
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/navigation/navigation_manager_delegate.h
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/navigation/navigation_manager_impl.mm
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/navigation/navigation_manager_impl_unittest.mm
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/navigation/wk_based_navigation_manager_impl_unittest.mm
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/test/fakes/fake_navigation_manager_delegate.h
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/test/fakes/fake_navigation_manager_delegate.mm
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/web_state/ui/crw_web_controller.h
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/68bfa35d85cb256eb9cff85c9992999fb3566cb8/ios/web/web_state/web_state_impl.mm

Project Member

Comment 34 by bugdroid1@chromium.org, Apr 13 2018

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

commit 00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c
Author: Eugene But <eugenebut@google.com>
Date: Fri Apr 13 20:03:57 2018

Move NativeContent callbacks from Web Delegate to Native Content Provider

At this point almost all callbacks were removed from CRWWebDelegate and
the only remaining callbacks are related to Native Content size (moved in
this CL) and external app launching (will be moved to PolicyDecider).

CRWNativeContentProvider is still heavily used for features like NTP,
Old Download Manager, Error Pages, Reading List. It will take more time
to get rid of Native Content Provider, so size callbacks can temporary
live there.

Bug:  674991 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ia5c6d565a116c858f3fe5fefa4964364144a8279
Reviewed-on: https://chromium-review.googlesource.com/1010822
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550738}
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/prerender/preload_controller_delegate.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/tabs/BUILD.gn
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/tabs/tab.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/tabs/tab.mm
[delete] https://crrev.com/a506d4425eb55369a5d0b0bf8e2ef28d8e19d4b5/ios/chrome/browser/tabs/tab_headers_delegate.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/public/test/fakes/test_native_content_provider.mm
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/public/web_state/ui/crw_native_content_provider.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/web_state/ui/crw_web_controller.mm

Project Member

Comment 35 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c

commit 00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c
Author: Eugene But <eugenebut@google.com>
Date: Fri Apr 13 20:03:57 2018

Move NativeContent callbacks from Web Delegate to Native Content Provider

At this point almost all callbacks were removed from CRWWebDelegate and
the only remaining callbacks are related to Native Content size (moved in
this CL) and external app launching (will be moved to PolicyDecider).

CRWNativeContentProvider is still heavily used for features like NTP,
Old Download Manager, Error Pages, Reading List. It will take more time
to get rid of Native Content Provider, so size callbacks can temporary
live there.

Bug:  674991 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ia5c6d565a116c858f3fe5fefa4964364144a8279
Reviewed-on: https://chromium-review.googlesource.com/1010822
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550738}
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/prerender/preload_controller_delegate.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/tabs/BUILD.gn
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/tabs/tab.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/tabs/tab.mm
[delete] https://crrev.com/a506d4425eb55369a5d0b0bf8e2ef28d8e19d4b5/ios/chrome/browser/tabs/tab_headers_delegate.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/public/test/fakes/test_native_content_provider.mm
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/public/web_state/ui/crw_native_content_provider.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/00fcaa89bdd9bfc306e81be7ce7e58a8d3cf985c/ios/web/web_state/ui/crw_web_controller.mm

Owner: mrefaat@chromium.org
Status: Assigned (was: Started)
External App Launcher callbacks are the last methods to remove.
Blocking: 620438
Status: Started (was: Assigned)
Blockedon: 820201
Blockedon: 850760
Project Member

Comment 41 by bugdroid1@chromium.org, Jul 19

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

commit dca5f4d39a65d25125fff3be718ebea2bc8ce710
Author: mrefaat <mrefaat@chromium.org>
Date: Thu Jul 19 01:25:17 2018

Remove CRWWebDelegate ShouldOpenExternalURL and its users

Remove the method from PreloadController and CRWWebController
and replace it with a new WebStateDelegate method ShouldAllowAppLaunching
that is implemented by both PreloadController and BrowserViewController.


Bug: 850760,  674991 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I28cd1b512368f27572a028c43f8caaebfe135a8b
Reviewed-on: https://chromium-review.googlesource.com/1137343
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Peter Lee <pkl@chromium.org>
Reviewed-by: Danyao Wang <danyao@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576302}
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/test/crw_mock_web_state_delegate.h
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/test/crw_mock_web_state_delegate.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/test/fakes/test_web_state_delegate.h
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/test/fakes/test_web_state_delegate.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/web_state/web_state_delegate.h
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/public/web_state/web_state_delegate_bridge.h
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/web_state_delegate.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/web_state_delegate_bridge.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/web_state_delegate_bridge_unittest.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/dca5f4d39a65d25125fff3be718ebea2bc8ce710/ios/web/web_state/web_state_impl_unittest.mm

Project Member

Comment 42 by bugdroid1@chromium.org, Jul 26

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

commit b8927e4ff22796a483188858072c82aa1e5738dc
Author: mrefaat <mrefaat@chromium.org>
Date: Thu Jul 26 21:49:57 2018

Remove the usage of CRWWebDelegate's openExternalURL method.

This is the last of CRWWebDelegate methods used by CRWWebController, removing it
will allow deleting the CRWWebDelegate entirely.
Also removed it from Tab and from PreloadController which were implementing them.
The logic of handling external apps is now entirely moved to AppLauncherTabHelper
which is a policy decider and is attached to the web state used by the CRWWebController.

Bug: 850760, 681867,  674991 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I2df6282ae561eef2e1da8fac605f42dbfe4cb97b
Reviewed-on: https://chromium-review.googlesource.com/1124942
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578447}
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/app_launcher/BUILD.gn
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/app_launcher/app_launcher_tab_helper.h
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/app_launcher/app_launcher_tab_helper.mm
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/app_launcher/app_launcher_tab_helper_unittest.mm
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/tabs/tab.h
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/chrome/browser/tabs/tab_unittest.mm
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/b8927e4ff22796a483188858072c82aa1e5738dc/ios/web/web_state/ui/crw_web_controller.mm

Project Member

Comment 43 by bugdroid1@chromium.org, Aug 2

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

commit 2b73f108b65405445dfa11f216275bbc2153ae61
Author: mrefaat <mrefaat@chromium.org>
Date: Thu Aug 02 02:44:09 2018

Create objective-c bridge for WebStatePolicyDecider

Created CRWWebStatePolicyDecider delegate.
Created WebStatePolicyDeciderBridge.
Created CRWTestWebStatePolicyDecider (fake test class).
Added unit tests for the newely created delegate/bridge.

This will be required by PreloadController as it's an objective-c class
and i'm going to make it a WebStatePolicyDecider (as part of effort to
move any logic related to app launching out of the CRWWebController.

Bug:  674991 , 850760
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I8e17d4d23fc4960609a19708148baa73381983c8
Reviewed-on: https://chromium-review.googlesource.com/1157135
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580037}
[modify] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/BUILD.gn
[modify] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/public/BUILD.gn
[modify] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/public/test/fakes/BUILD.gn
[add] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/public/test/fakes/crw_fake_web_state_policy_decider.h
[add] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/public/test/fakes/crw_fake_web_state_policy_decider.mm
[add] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/public/web_state/web_state_policy_decider_bridge.h
[modify] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/web_state/BUILD.gn
[add] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/web_state/web_state_policy_decider_bridge.mm
[add] https://crrev.com/2b73f108b65405445dfa11f216275bbc2153ae61/ios/web/web_state/web_state_policy_decider_bridge_unittest.mm

Project Member

Comment 44 by bugdroid1@chromium.org, Aug 2

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

commit 308f022e85ad7a6295419bccc5c21ddfb2a5bd88
Author: mrefaat <mrefaat@chromium.org>
Date: Thu Aug 02 03:22:39 2018

Remove CRWWebDelegate protocol from iOS Chrome.

There seems to be some headers that was stuck in crw_web_delegate.h during several past
refactors. This CL remove the crw_web_delegate.h file and import/include these headers
in their required places.

Bug:  674991 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I4d4b20ed21df4e7b9586bce966d6c27a09cb55a5
Reviewed-on: https://chromium-review.googlesource.com/1147489
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Reviewed-by: Peter Lee <pkl@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580048}
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/chrome/browser/tabs/tab_private.h
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/chrome/browser/ui/side_swipe/side_swipe_controller.mm
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/web/public/BUILD.gn
[delete] https://crrev.com/6c69924778f4c35a5a9e87e53339401173bf5856/ios/web/public/web_state/ui/crw_web_delegate.h
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/web/web_state/ui/crw_web_controller.h
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/web/web_state/ui/crw_web_controller_unittest.mm
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/308f022e85ad7a6295419bccc5c21ddfb2a5bd88/ios/web_view/internal/cwv_web_view.mm

Status: Fixed (was: Started)
Project Member

Comment 46 by bugdroid1@chromium.org, Aug 2

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

commit 3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1
Author: mrefaat <mrefaat@chromium.org>
Date: Thu Aug 02 20:11:34 2018

Convert PreloadController to be a Webstate policy decider

- Make PreloadController conform to CRWWebStatePolicyDecider protocol.
- Add the preloadController as a policy decider directly after the
  webstate is created (in StartPrerender) and make sure it's removed
  when the webstate is not in the prerender state anymore.
- Use ShouldAllowRequest of CRWWebStatePolicyDecider to block the
  navigation, if the request url can be handled by either
  ITunesUrlHandlerTabHelper, or AppLauncherTabHelper.
- Update CRWWebController, so it doesn't use
  isAppLaunchingAllowedForWebState to cancel prerender navigation.
- Remove isAppLaunchingAllowedForWebState WebState delegate method
  and all its usages.

Bug:  674991 , 850760
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I96721de983f74834b0d5a6d8977849e995523e98
Reviewed-on: https://chromium-review.googlesource.com/1157692
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580293}
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/app_launcher/app_launcher_tab_helper.h
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/app_launcher/app_launcher_tab_helper.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/itunes_urls/itunes_urls_handler_tab_helper.h
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/itunes_urls/itunes_urls_handler_tab_helper.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/prerender/BUILD.gn
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/prerender/preload_controller.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/public/test/fakes/test_web_state_delegate.h
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/public/test/fakes/test_web_state_delegate.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/public/web_state/web_state_delegate.h
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/public/web_state/web_state_delegate_bridge.h
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/web_state_delegate.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/web_state_delegate_bridge.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/web_state_delegate_bridge_unittest.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/web_state_impl.h
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/web_state_impl.mm
[modify] https://crrev.com/3ad5e41fe8ea8ace5c1c05b9fca763b39a335ed1/ios/web/web_state/web_state_impl_unittest.mm

Sign in to add a comment