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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 501583003: Move external popup menus from WebViewClient to WebFrameClient, part 3/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nicer ipc Created 6 years, 4 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
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 295bb67cab4e4694d12bca03e3db41383348cc22..97852aefb1c0f541b1df6db6892dd0e1b8331d68 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -237,6 +237,7 @@ public class ContentViewCore
private PopupZoomer mPopupZoomer;
private SelectPopup mSelectPopup;
+ private long mNativeSelectPopupSourceFrame = 0;
private Runnable mFakeMouseMoveRunnable = null;
@@ -1913,8 +1914,10 @@ public class ContentViewCore
public void selectPopupMenuItems(int[] indices) {
if (mNativeContentViewCore != 0) {
- nativeSelectPopupMenuItems(mNativeContentViewCore, indices);
+ nativeSelectPopupMenuItems(mNativeContentViewCore, mNativeSelectPopupSourceFrame,
+ indices);
}
+ mNativeSelectPopupSourceFrame = 0;
mSelectPopup = null;
}
@@ -2305,6 +2308,7 @@ public class ContentViewCore
/**
* Called (from native) when the <select> popup needs to be shown.
+ * @param nativeSelectPopupSourceFrame The native RenderFrameHost that owns the popup.
* @param items Items to show.
* @param enabled POPUP_ITEM_TYPEs for items.
* @param multiple Whether the popup menu should support multi-select.
@@ -2312,8 +2316,8 @@ public class ContentViewCore
*/
@SuppressWarnings("unused")
@CalledByNative
- private void showSelectPopup(Rect bounds, String[] items, int[] enabled, boolean multiple,
- int[] selectedIndices) {
+ private void showSelectPopup(long nativeSelectPopupSourceFrame, Rect bounds, String[] items,
+ int[] enabled, boolean multiple, int[] selectedIndices) {
if (mContainerView.getParent() == null || mContainerView.getVisibility() != View.VISIBLE) {
selectPopupMenuItems(null);
return;
@@ -2330,6 +2334,7 @@ public class ContentViewCore
} else {
mSelectPopup = new SelectPopupDialog(this, popupItems, multiple, selectedIndices);
}
+ mNativeSelectPopupSourceFrame = nativeSelectPopupSourceFrame;
mSelectPopup.show();
}
@@ -3155,7 +3160,8 @@ public class ContentViewCore
private native void nativeSetMultiTouchZoomSupportEnabled(
long nativeContentViewCoreImpl, boolean enabled);
- private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl, int[] indices);
+ private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl,
+ long nativeSelectPopupSourceFrame, int[] indices);
private native void nativeClearHistory(long nativeContentViewCoreImpl);

Powered by Google App Engine
This is Rietveld 408576698