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

Issue 1340163002: PlzNavigate: fix timing issue in app window creation (Closed)

Created:
5 years, 3 months ago by clamy
Modified:
5 years, 3 months ago
Reviewers:
Charlie Reis, Devlin, nasko
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@navigation-throttle
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: fix timing issue in app window creation This CL fixes a timing bug in which a newly created app window would try to register a ScriptContext before being told to commit a navigation. This would result in an incorrect frame url being passed to the ScriptContextSet, and a wrong ContextType to be computed from it. With this CL, when browser-side navigation is enabled, sending the response to the app.window.create is deferred until the navigation in the newly created frame is ready to commit. BUG=504347 Committed: https://crrev.com/efca29ea8d6161c50c7e289f8d5ed7b33723bc41 Cr-Commit-Position: refs/heads/master@{#349290}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : Addressed Nasko's comments #

Total comments: 16

Patch Set 5 : Addressed comments #

Total comments: 4

Patch Set 6 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -2 lines) Patch
M content/browser/frame_host/navigator_delegate.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_observer.h View 1 2 3 4 5 2 chunks +11 lines, -2 lines 0 comments Download
M content/test/web_contents_observer_sanity_checker.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/test/web_contents_observer_sanity_checker.cc View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M extensions/browser/api/app_window/app_window_api.cc View 1 2 chunks +11 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window.cc View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download
M extensions/browser/app_window/app_window_contents.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/app_window/app_window_contents.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
clamy
@naskoe, creis, rdcronin: PTAL This CL fixes the issue of app windows with PlzNavigate that ...
5 years, 3 months ago (2015-09-15 18:08:01 UTC) #2
nasko
Looks good overall, though I think the naming of the method can be a bit ...
5 years, 3 months ago (2015-09-16 20:19:36 UTC) #3
clamy
Thanks! https://codereview.chromium.org/1340163002/diff/40001/content/public/browser/web_contents_observer.h File content/public/browser/web_contents_observer.h (right): https://codereview.chromium.org/1340163002/diff/40001/content/public/browser/web_contents_observer.h#newcode147 content/public/browser/web_contents_observer.h:147: virtual void AboutToCommitNavigation(NavigationHandle* navigation_handle) {} On 2015/09/16 20:19:36, ...
5 years, 3 months ago (2015-09-16 21:32:35 UTC) #4
nasko
content/ LGTM with one last note. https://codereview.chromium.org/1340163002/diff/60001/content/public/browser/web_contents_observer.h File content/public/browser/web_contents_observer.h (right): https://codereview.chromium.org/1340163002/diff/60001/content/public/browser/web_contents_observer.h#newcode146 content/public/browser/web_contents_observer.h:146: // navigation. One ...
5 years, 3 months ago (2015-09-16 21:37:50 UTC) #5
Devlin
https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc File extensions/browser/app_window/app_window.cc (right): https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc#newcode448 extensions/browser/app_window/app_window.cc:448: on_first_commit_callback_ = callback; Can we DCHECK(on_first_commit_callback_.is_null()) here? https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc#newcode458 extensions/browser/app_window/app_window.cc:458: ...
5 years, 3 months ago (2015-09-16 21:44:04 UTC) #6
clamy
Thanks! https://codereview.chromium.org/1340163002/diff/60001/content/public/browser/web_contents_observer.h File content/public/browser/web_contents_observer.h (right): https://codereview.chromium.org/1340163002/diff/60001/content/public/browser/web_contents_observer.h#newcode146 content/public/browser/web_contents_observer.h:146: // navigation. On 2015/09/16 21:37:50, nasko (slow to ...
5 years, 3 months ago (2015-09-16 22:19:39 UTC) #7
Devlin
lgtm https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc File extensions/browser/app_window/app_window.cc (right): https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc#newcode458 extensions/browser/app_window/app_window.cc:458: // WebContentsObserver::AboutToCommitNavigation have been processed. The On 2015/09/16 ...
5 years, 3 months ago (2015-09-16 22:37:14 UTC) #8
clamy
Thanks! https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc File extensions/browser/app_window/app_window.cc (right): https://codereview.chromium.org/1340163002/diff/60001/extensions/browser/app_window/app_window.cc#newcode458 extensions/browser/app_window/app_window.cc:458: // WebContentsObserver::AboutToCommitNavigation have been processed. The On 2015/09/16 ...
5 years, 3 months ago (2015-09-16 23:08:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1340163002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1340163002/100001
5 years, 3 months ago (2015-09-16 23:09:03 UTC) #12
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 3 months ago (2015-09-17 00:22:17 UTC) #13
commit-bot: I haz the power
5 years, 3 months ago (2015-09-17 00:23:13 UTC) #14
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/efca29ea8d6161c50c7e289f8d5ed7b33723bc41
Cr-Commit-Position: refs/heads/master@{#349290}

Powered by Google App Engine
This is Rietveld 408576698