|
|
Created:
3 years, 12 months ago by shaktisahu Modified:
3 years, 11 months ago CC:
chromium-reviews, dominickn+watch_chromium.org, dfalcantara+watch_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org, agrieve+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionWebContentsObserver and TabObserver update for PlzNavigate
This CL updates the WebContentsObserver and TabObserver interface to
add the new methods for PlzNavigate. The old and deprecated methods are
still there and will be removed in a subsequent CL including the usages
of the interface.
BUG=676139
Review-Url: https://codereview.chromium.org/2604543002
Cr-Commit-Position: refs/heads/master@{#442132}
Committed: https://chromium.googlesource.com/chromium/src/+/a4b7ae7967b24e8963eedc201171c34695d88f06
Patch Set 1 #Patch Set 2 : rebase (Removed NavigationHandle class) #Patch Set 3 : Enabled plzNavigate mode for testing #Patch Set 4 : Rebase to master, plzNavigate off #Patch Set 5 : Code with new API without any real hookup #
Total comments: 4
Patch Set 6 : tedchoc@ comments for pageTransition #
Total comments: 4
Patch Set 7 : nits #Depends on Patchset: Messages
Total messages: 51 (42 generated)
The CQ bit was checked by shaktisahu@chromium.org
The CQ bit was unchecked by shaktisahu@chromium.org
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...)
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
Patchset #2 (id:20001) has been deleted
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #3 (id:60001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by shaktisahu@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== TabObserver update for PlzNavigate This CL updates the TabWebContentsObserver and TabObserver interface to use the new methods and get rid off the deprecated methods. All the users of TabObserver were updated accordingly. BUG=676139 ========== to ========== WebContentsObserver and TabObserver update for PlzNavigate This CL updates the WebContentsObserver and TabObserver interface to add the new methods for PlzNavigate. The old and deprecated methods are still there and will be removed in a subsequent CL including the usages of the interface. BUG=676139 ==========
Description was changed from ========== WebContentsObserver and TabObserver update for PlzNavigate This CL updates the WebContentsObserver and TabObserver interface to add the new methods for PlzNavigate. The old and deprecated methods are still there and will be removed in a subsequent CL including the usages of the interface. BUG=676139 ========== to ========== WebContentsObserver and TabObserver update for PlzNavigate This CL updates the WebContentsObserver and TabObserver interface to add the new methods for PlzNavigate. The old and deprecated methods are still there and will be removed in a subsequent CL including the usages of the interface. BUG=676139 ==========
shaktisahu@chromium.org changed reviewers: + tedchoc@chromium.org
tedchoc@ - PTAL. As we spoke offline, I have split the CL. This is the first part. I just have copied over most of the stuff https://codereview.chromium.org/2598163002/ and added the methods to TabObserver. None of the call sites are hooked up with the new interface.
tedchoc@chromium.org changed reviewers: + sky@chromium.org
+sky for my comment in web_contents_observer_proxy. https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... File content/browser/android/web_contents_observer_proxy.cc (right): https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... content/browser/android/web_contents_observer_proxy.cc:231: is_reload = ui::PageTransitionCoreTypeIs( pass the page transition type directly instead of is_reload. There is a problem where this should be an invalid value before committed. In that case, I would consider passing -1 to the java WebContentsObserverProxy, but I might change the java interface to pass a capital I Integer in the param list and convert the -1 to null in that case. Another option would be to add a new enum in c++ of PAGE_TRANSITION_INVALID = -1; or something. Might be cleaner and avoid the java checking, but then you'd need to get sign of of all those owners. I don't know if it is worth floating the value by them first or if we should just isolate this to java for now. https://codereview.chromium.org/2604543002/diff/120001/content/public/android... File content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java (right): https://codereview.chromium.org/2604543002/diff/120001/content/public/android... content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java:51: * document (for example scrolling to a named anchor or PopState). reduce intent to align with "Whether the " above. https://codereview.chromium.org/2604543002/diff/120001/content/public/android... content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java:56: boolean hasCommitted, boolean isSamePage, boolean isReload, int errorCode) {} Here if we pass Integer pageTransitionType, I would annotate it with @Nullable.
https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... File content/browser/android/web_contents_observer_proxy.cc (right): https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... content/browser/android/web_contents_observer_proxy.cc:231: is_reload = ui::PageTransitionCoreTypeIs( On 2017/01/06 21:50:59, Ted C wrote: > pass the page transition type directly instead of is_reload. > > There is a problem where this should be an invalid value before committed. In > that case, I would consider passing -1 to the java WebContentsObserverProxy, but > I might change the java interface to pass a capital I Integer in the param list > and convert the -1 to null in that case. > > Another option would be to add a new enum in c++ of > > PAGE_TRANSITION_INVALID = -1; or something. Might be cleaner and avoid the java > checking, but then you'd need to get sign of of all those owners. I don't know > if it is worth floating the value by them first or if we should just isolate > this to java for now. If we add INVALID it means all existing code would have to deal with INVALID, which it doesn't know. That would be confusing to many places and likely add a slew of DCHECKs. As we've got this far within INVALID I'm inclined not to add it now.
On 2017/01/06 23:14:43, sky wrote: > https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... > File content/browser/android/web_contents_observer_proxy.cc (right): > > https://codereview.chromium.org/2604543002/diff/120001/content/browser/androi... > content/browser/android/web_contents_observer_proxy.cc:231: is_reload = > ui::PageTransitionCoreTypeIs( > On 2017/01/06 21:50:59, Ted C wrote: > > pass the page transition type directly instead of is_reload. > > > > There is a problem where this should be an invalid value before committed. In > > that case, I would consider passing -1 to the java WebContentsObserverProxy, > but > > I might change the java interface to pass a capital I Integer in the param > list > > and convert the -1 to null in that case. > > > > Another option would be to add a new enum in c++ of > > > > PAGE_TRANSITION_INVALID = -1; or something. Might be cleaner and avoid the > java > > checking, but then you'd need to get sign of of all those owners. I don't > know > > if it is worth floating the value by them first or if we should just isolate > > this to java for now. > > If we add INVALID it means all existing code would have to deal with INVALID, > which it doesn't know. That would be confusing to many places and likely add a > slew of DCHECKs. As we've got this far within INVALID I'm inclined not to add it > now. sgtm! we'll isolate to java for now
tedchoc@ - PTAL
lgtm w/ a couple nits https://codereview.chromium.org/2604543002/diff/140001/chrome/android/java/sr... File chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java (right): https://codereview.chromium.org/2604543002/diff/140001/chrome/android/java/sr... chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java:266: * document (for example scrolling to a named anchor or PopState). same alignment nit (Whether the ...) https://codereview.chromium.org/2604543002/diff/140001/content/public/android... File content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java (right): https://codereview.chromium.org/2604543002/diff/140001/content/public/android... content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java:89: Integer pageTransition = transition == -1 ? null : Integer.valueOf(transition); I don't believe you need Integer.valueOf here as it will autobox it to Integer for you.
https://codereview.chromium.org/2604543002/diff/140001/chrome/android/java/sr... File chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java (right): https://codereview.chromium.org/2604543002/diff/140001/chrome/android/java/sr... chrome/android/java/src/org/chromium/chrome/browser/tab/TabObserver.java:266: * document (for example scrolling to a named anchor or PopState). On 2017/01/07 00:57:05, Ted C wrote: > same alignment nit (Whether the ...) Done. https://codereview.chromium.org/2604543002/diff/140001/content/public/android... File content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java (right): https://codereview.chromium.org/2604543002/diff/140001/content/public/android... content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java:89: Integer pageTransition = transition == -1 ? null : Integer.valueOf(transition); On 2017/01/07 00:57:05, Ted C wrote: > I don't believe you need Integer.valueOf here as it will autobox it to Integer > for you. Done. Thanks!
The CQ bit was checked by shaktisahu@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tedchoc@chromium.org Link to the patchset: https://codereview.chromium.org/2604543002/#ps160001 (title: "nits")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 160001, "attempt_start_ts": 1483751017477380, "parent_rev": "3e2c0df8485250d7bd94ab90fc6a260bf89cef71", "commit_rev": "a4b7ae7967b24e8963eedc201171c34695d88f06"}
Message was sent while issue was closed.
Description was changed from ========== WebContentsObserver and TabObserver update for PlzNavigate This CL updates the WebContentsObserver and TabObserver interface to add the new methods for PlzNavigate. The old and deprecated methods are still there and will be removed in a subsequent CL including the usages of the interface. BUG=676139 ========== to ========== WebContentsObserver and TabObserver update for PlzNavigate This CL updates the WebContentsObserver and TabObserver interface to add the new methods for PlzNavigate. The old and deprecated methods are still there and will be removed in a subsequent CL including the usages of the interface. BUG=676139 Review-Url: https://codereview.chromium.org/2604543002 Cr-Commit-Position: refs/heads/master@{#442132} Committed: https://chromium.googlesource.com/chromium/src/+/a4b7ae7967b24e8963eedc201171... ==========
Message was sent while issue was closed.
Committed patchset #7 (id:160001) as https://chromium.googlesource.com/chromium/src/+/a4b7ae7967b24e8963eedc201171... |