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

Issue 1049383008: Properly attach InfoBarContainer when it is swapped to a new WebContents (Closed)

Created:
5 years, 8 months ago by gone
Modified:
5 years, 8 months ago
Reviewers:
nyquist, newt (away)
CC:
chromium-reviews, David Trainor- moved to gerrit, avayvod+watch_chromium.org, nyquist
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Properly attach InfoBarContainer when it is swapped to a new WebContents * Moves the swapping of the InfoBarService from TabAndroid::SwapWebContents() to after TabAndroid::InitWebContents() is called from Tab.setContentViewCore(). This is necessary because InitWebContents attaches the InfoBarService to the WebContents; trying to swap before this point means that the InfoBarContainer will be observing nothing. * Fixes the ChromeShellActivity/Tab to properly update the ContentViewCore when it is swapped. This fixes the "Distill page" menu item. * Adds a test to try to prevent this from happening in the future. BUG=469026 TEST=InfoBarTest.testInfoBarContainerSwapsWebContents Committed: https://crrev.com/b96bae62466da45e949427e4ea56e1493d1bd47f Cr-Commit-Position: refs/heads/master@{#326642}

Patch Set 1 #

Patch Set 2 : Fixing completely differently #

Patch Set 3 : Spacing #

Total comments: 10

Patch Set 4 : Comments #

Messages

Total messages: 13 (4 generated)
gone
5 years, 8 months ago (2015-04-20 23:31:22 UTC) #2
gone
Redid all the things and added a unit test. PTAL.
5 years, 8 months ago (2015-04-22 22:18:13 UTC) #3
nyquist
I know I'm not the main reviewer here, so please wait for that, but this ...
5 years, 8 months ago (2015-04-22 22:28:47 UTC) #5
newt (away)
Looks good. I'm mainly just wondering if we can clean up InfoBarContainer's interface a bit ...
5 years, 8 months ago (2015-04-23 04:21:00 UTC) #6
gone
https://codereview.chromium.org/1049383008/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java File chrome/android/java/src/org/chromium/chrome/browser/Tab.java (right): https://codereview.chromium.org/1049383008/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/Tab.java#newcode1610 chrome/android/java/src/org/chromium/chrome/browser/Tab.java:1610: mInfoBarContainer.setContentViewCore(mContentViewCore); > - Does mInfoBarContainer.setContentViewCore() need to be called ...
5 years, 8 months ago (2015-04-23 18:15:01 UTC) #7
newt (away)
thanks for the additional improvements :) lgtm
5 years, 8 months ago (2015-04-23 21:01:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1049383008/60001
5 years, 8 months ago (2015-04-23 21:03:37 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-23 21:08:13 UTC) #12
commit-bot: I haz the power
5 years, 8 months ago (2015-04-23 21:09:11 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b96bae62466da45e949427e4ea56e1493d1bd47f
Cr-Commit-Position: refs/heads/master@{#326642}

Powered by Google App Engine
This is Rietveld 408576698