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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/FeedbackReporter.java

Issue 208263010: Fix a problem that FeedbackReportingView is stacked infinitely whenever navigating to chrome-distil… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/FeedbackReporter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/FeedbackReporter.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/FeedbackReporter.java
index 8661274438b380d1cb467b1cb8768efc5666df7f..6c140093ed7b86ff74716d2c97101765f8e86afa 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/FeedbackReporter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/FeedbackReporter.java
@@ -22,7 +22,6 @@ public final class FeedbackReporter implements FeedbackReportingView.FeedbackObs
private final Tab mTab;
private ContentView mContentView;
private FeedbackReportingView mFeedbackReportingView;
- private String mOverlayUrl;
/**
* @return whether the DOM Distiller feature is enabled.
@@ -70,6 +69,7 @@ public final class FeedbackReporter implements FeedbackReportingView.FeedbackObs
/**
* Start showing the overlay.
*/
+ @CalledByNative
private void showOverlay() {
mFeedbackReportingView = FeedbackReportingView.create(mContentView, this);
}
@@ -79,14 +79,10 @@ public final class FeedbackReporter implements FeedbackReportingView.FeedbackObs
*/
@CalledByNative
private void dismissOverlay() {
- if (mFeedbackReportingView != null) mFeedbackReportingView.dismiss(true);
- mOverlayUrl = null;
- mFeedbackReportingView = null;
- }
-
- @CalledByNative
- private String getCurrentOverlayUrl() {
- return mOverlayUrl;
+ if (mFeedbackReportingView != null) {
+ mFeedbackReportingView.dismiss(true);
+ mFeedbackReportingView = null;
+ }
}
/**
@@ -117,17 +113,6 @@ public final class FeedbackReporter implements FeedbackReportingView.FeedbackObs
}
@Override
- public void onUpdateUrl(Tab tab, String url) {
- boolean reportable = nativeIsReportableUrl(url);
- if (reportable) {
- mOverlayUrl = url;
- showOverlay();
- } else {
- dismissOverlay();
- }
- }
-
- @Override
public void onDestroyed(Tab tab) {
nativeDestroy(mNativePointer);
mContentView = null;
@@ -137,8 +122,6 @@ public final class FeedbackReporter implements FeedbackReportingView.FeedbackObs
private static native boolean nativeIsEnabled();
- private static native boolean nativeIsReportableUrl(String url);
-
private static native void nativeReportQuality(boolean good);
private native long nativeInit();
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698