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

Unified Diff: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java

Issue 1541473002: Revert of Pull the Activity context from WindowAndroid if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
diff --git a/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java b/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
index 25f5f62fd1896098f86f740adab9858905b5bd6e..207fee2dd4335ec8cc21f94117115fbd341944e1 100644
--- a/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
+++ b/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/ColorChooserAndroid.java
@@ -12,7 +12,6 @@
import org.chromium.ui.ColorPickerDialog;
import org.chromium.ui.ColorSuggestion;
import org.chromium.ui.OnColorChangedListener;
-import org.chromium.ui.base.WindowAndroid;
/**
* ColorChooserAndroid communicates with the java ColorPickerDialog and the
@@ -52,11 +51,8 @@
ContentViewCore contentViewCore,
int initialColor,
ColorSuggestion[] suggestions) {
- if (contentViewCore.getWindowAndroid() == null) return null;
- Context windowContext = contentViewCore.getWindowAndroid().getContext().get();
- if (WindowAndroid.activityFromContext(windowContext) == null) return null;
ColorChooserAndroid chooser = new ColorChooserAndroid(nativeColorChooserAndroid,
- windowContext, initialColor, suggestions);
+ contentViewCore.getContext(), initialColor, suggestions);
chooser.openColorChooser();
return chooser;
}

Powered by Google App Engine
This is Rietveld 408576698