Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1266)

Issue 2684143002: Remove deprecated navigation callbacks on WebContentsObserver that are now unused. (Closed)

Created:
3 years, 10 months ago by jam
Modified:
3 years, 10 months ago
Reviewers:
dmazzoni, nasko, jam1
CC:
chromium-reviews, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove deprecated navigation callbacks on WebContentsObserver that are now unused. BUG=682002 Review-Url: https://codereview.chromium.org/2684143002 Cr-Commit-Position: refs/heads/master@{#449974} Committed: https://chromium.googlesource.com/chromium/src/+/5f358e52c9000b100f9b4e3964dd044425ad9b8c

Patch Set 1 #

Total comments: 9

Patch Set 2 : call old RFH's BrowserAccessibilityManager #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -214 lines) Patch
M content/browser/frame_host/navigator_delegate.h View 2 chunks +0 lines, -12 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 2 chunks +0 lines, -20 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 chunk +0 lines, -11 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 5 chunks +24 lines, -62 lines 0 comments Download
M content/public/browser/web_contents_observer.h View 2 chunks +0 lines, -56 lines 0 comments Download
M content/test/web_contents_observer_sanity_checker.h View 1 chunk +0 lines, -17 lines 0 comments Download
M content/test/web_contents_observer_sanity_checker.cc View 1 chunk +0 lines, -36 lines 0 comments Download

Messages

Total messages: 52 (39 generated)
jam
3 years, 10 months ago (2017-02-10 18:40:53 UTC) #26
nasko
LGTM with a couple of notes. https://codereview.chromium.org/2684143002/diff/80001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (left): https://codereview.chromium.org/2684143002/diff/80001/content/browser/frame_host/navigator_impl.cc#oldcode709 content/browser/frame_host/navigator_impl.cc:709: params.transition | ui::PAGE_TRANSITION_FORWARD_BACK); ...
3 years, 10 months ago (2017-02-10 19:44:58 UTC) #29
jam
https://codereview.chromium.org/2684143002/diff/80001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (left): https://codereview.chromium.org/2684143002/diff/80001/content/browser/frame_host/navigator_impl.cc#oldcode709 content/browser/frame_host/navigator_impl.cc:709: params.transition | ui::PAGE_TRANSITION_FORWARD_BACK); On 2017/02/10 19:44:58, nasko wrote: > ...
3 years, 10 months ago (2017-02-10 20:00:34 UTC) #30
dmazzoni
https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3312 content/browser/web_contents/web_contents_impl.cc:3312: // Notify accessibility if this is a reload. BrowserAccessibilityManager::UserIsReloading() ...
3 years, 10 months ago (2017-02-10 20:47:45 UTC) #32
jam
https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3312 content/browser/web_contents/web_contents_impl.cc:3312: // Notify accessibility if this is a reload. On ...
3 years, 10 months ago (2017-02-10 20:52:40 UTC) #33
nasko
https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3312 content/browser/web_contents/web_contents_impl.cc:3312: // Notify accessibility if this is a reload. On ...
3 years, 10 months ago (2017-02-10 21:28:39 UTC) #34
jam
On 2017/02/10 21:28:39, nasko wrote: > https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc > File content/browser/web_contents/web_contents_impl.cc (right): > > https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3312 > ...
3 years, 10 months ago (2017-02-10 22:32:30 UTC) #35
nasko
On 2017/02/10 22:32:30, jam wrote: > On 2017/02/10 21:28:39, nasko wrote: > > > https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc ...
3 years, 10 months ago (2017-02-13 15:22:10 UTC) #38
jam1
https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3312 content/browser/web_contents/web_contents_impl.cc:3312: // Notify accessibility if this is a reload. ok ...
3 years, 10 months ago (2017-02-13 15:40:25 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2684143002/100001
3 years, 10 months ago (2017-02-13 15:41:04 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2684143002/100001
3 years, 10 months ago (2017-02-13 16:32:16 UTC) #48
commit-bot: I haz the power
Committed patchset #2 (id:100001) as https://chromium.googlesource.com/chromium/src/+/5f358e52c9000b100f9b4e3964dd044425ad9b8c
3 years, 10 months ago (2017-02-13 16:37:46 UTC) #51
dmazzoni
3 years, 10 months ago (2017-02-13 19:05:46 UTC) #52
Message was sent while issue was closed.
https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_con...
File content/browser/web_contents/web_contents_impl.cc (right):

https://codereview.chromium.org/2684143002/diff/80001/content/browser/web_con...
content/browser/web_contents/web_contents_impl.cc:3312: // Notify accessibility
if this is a reload.
On 2017/02/10 21:28:39, nasko wrote:
> On 2017/02/10 20:52:40, jam wrote:
> > On 2017/02/10 20:47:45, dmazzoni wrote:
> > > BrowserAccessibilityManager::UserIsReloading() is supposed to be called on
> the
> > > BAM associated with the OLD RFHI.
> > > 
> > > If that's still the case, we're good.
> > > 
> > > What it does it (1) notify AT that the reload is happening (a
nice-to-have,
> > but
> > > not critical), and
> > > (2) ignores further accessibility notifications on the OLD accessibility
> tree,
> > > since it's no longer valid. This prevents race conditions where the new
page
> > has
> > > started to load but we still have some accessibility IPC trickling in from
> the
> > > old page.
> > > 
> > > This really needs some test coverage. Please assign something to me. If
you
> > can
> > > find a good test in content_browsertests that covers reloading now that I
> > could
> > > build on / fork, that would be helpful.
> > 
> > With a reload, we wouldn't be changing the RFH so this should be fine.
> > 
> > Nasko:?
> 
> This isn't quite correct, there are cases where this can happen. An example is
> installing a hosted app for the page you are currently on. Upon reload, we
will
> change the RFH, as it is no longer regular one, but an extension one.
> 
> Dominic: why do we need to send a signal to the old RFH? It will get destroyed
> shortly anyway.

Digging in some more, the call to UserIsNavigatingAway() is actually sufficient.
The issue is that there's a delay between when the new page starts loading and
when it becomes the default RFH for this frame node. During that time window,
we get accessibility events for both frames, so we want to ignore accessibility
events on the old frame as soon as we know it's going to be destroyed.

I'll add some test coverage and follow up if I have more questions.

Powered by Google App Engine
This is Rietveld 408576698