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

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: rebase 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
« no previous file with comments | « content/content_browser.gypi ('k') | content/renderer/external_popup_menu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0905d8503ec936ca61235ad745b8559d5ba45695..cc9ab1872a0442a5b7a33156bcb94ce2c4bfcd28 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;
@@ -1919,8 +1920,10 @@ public class ContentViewCore
public void selectPopupMenuItems(int[] indices) {
if (mNativeContentViewCore != 0) {
- nativeSelectPopupMenuItems(mNativeContentViewCore, indices);
+ nativeSelectPopupMenuItems(mNativeContentViewCore, mNativeSelectPopupSourceFrame,
+ indices);
}
+ mNativeSelectPopupSourceFrame = 0;
mSelectPopup = null;
}
@@ -2311,6 +2314,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.
@@ -2318,8 +2322,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;
@@ -2336,6 +2340,7 @@ public class ContentViewCore
} else {
mSelectPopup = new SelectPopupDialog(this, popupItems, multiple, selectedIndices);
}
+ mNativeSelectPopupSourceFrame = nativeSelectPopupSourceFrame;
mSelectPopup.show();
}
@@ -3178,7 +3183,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);
« no previous file with comments | « content/content_browser.gypi ('k') | content/renderer/external_popup_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698