|
Discourage creation of Java infobars without InfoBarDelegates
Java:
* Make InfoBarContainer#addInfoBar() a private method so it can't
be abused anymore.
* Get rid of InfoBar.dismissJavaOnlyInfoBar() and the assorted
InfoBarListeners to prevent them from being used incorrectly.
* Introduce a SimpleConfirmInfoBarBuilder class that makes it
easier for devs to create infobars that operate mostly in
Java that are still backed by native InfoBarDelegates.
C++:
* Expose InfoBarIdentifier enum to Java-side code. Although the
end goal is to get rid of Java-only infobars entirely, we're
still stuck with a generic infobar for popping up errors from
ChromeWindow#showCallbackNonExistentError() (e.g.).
* Introduce an Android-specific SimpleConfirmInfoBarDelegate
class that listens for button clicks and alerts a Java-side
listener.
Tests:
* Renames InfoBarTest2 to InfoBarContainerTest. These weren't running
at all because the test filters look for Java classes ending with
the word Test, not Test2.
* Deletes a few InfoBarTest2 tests that need to be rewritten for the
stacking world (on newt@'s agenda).
* Edited tests that directly accessed the InfoBarContainer#addInfoBar()
to use the new SimpleConfirmInfoBarBuilder instead.
BUG= 172427, 543205, 569776
Committed: https://crrev.com/7e344082f74a50857d7c2441d1816f69c55b2ae5
Cr-Commit-Position: refs/heads/master@{#370792}
Total comments: 12
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+523 lines, -851 lines) |
Patch |
 |
M |
chrome/android/BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ChromeWindow.java
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
|
View
|
|
4 chunks |
+75 lines, -73 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarAndroid.java
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/AutoSigninFirstRunInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/AutofillSaveCardInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java
|
View
|
|
4 chunks |
+4 lines, -13 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionProxyInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/DownloadOverwriteInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/GeneratedPasswordSavedInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java
|
View
|
|
6 chunks |
+5 lines, -52 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
|
View
|
1
2
3
4
5
|
4 chunks |
+4 lines, -29 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
D |
chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarListeners.java
|
View
|
|
1 chunk |
+0 lines, -28 lines |
0 comments
|
Download
|
 |
D |
chrome/android/java/src/org/chromium/chrome/browser/infobar/MessageInfoBar.java
|
View
|
|
1 chunk |
+0 lines, -35 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/SavePasswordInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
chrome/android/java/src/org/chromium/chrome/browser/infobar/SimpleConfirmInfoBarBuilder.java
|
View
|
|
1 chunk |
+92 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateInfoBar.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A + |
chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java
|
View
|
1
2
3
4
|
9 chunks |
+99 lines, -172 lines |
0 comments
|
Download
|
 |
D |
chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarTest2.java
|
View
|
|
1 chunk |
+0 lines, -432 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/android/chrome_jni_registrar.cc
|
View
|
1
2
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.h
|
View
|
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.cc
|
View
|
1
2
3
4
|
1 chunk |
+174 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome.gyp
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_browser.gypi
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_browser_ui.gypi
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/infobars.gypi
|
View
|
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/infobars/core/BUILD.gn
|
View
|
1
2
3
|
2 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/infobars/core/infobar_delegate.h
|
View
|
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/metrics/histograms/histograms.xml
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 23 (9 generated)
|