Blimp Engine is based on Linux with USE_AURA, and its client is an Android app. It is desirable for end users to see the same Chrome Android external popup menu handling.
Thus, add USE_EXTERNAL_POPUP_MENU flag so that Blimp Engine can follow the same code path of the external Android popup menus before it reaches WebContentsView.
BUG=598764
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/1992393002
Cr-Commit-Position: refs/heads/master@{#397575}
diff --git a/content/renderer/external_popup_menu.cc b/content/renderer/external_popup_menu.cc
index 7bb01a1d..95b41a7 100644
--- a/content/renderer/external_popup_menu.cc
+++ b/content/renderer/external_popup_menu.cc
@@ -63,6 +63,7 @@
// |this| was deleted.
}
+#if defined(USE_EXTERNAL_POPUP_MENU)
#if defined(OS_MACOSX)
void ExternalPopupMenu::DidSelectItem(int index) {
if (!popup_menu_client_)
@@ -72,9 +73,7 @@
else
popup_menu_client_->didAcceptIndex(index);
}
-#endif
-
-#if defined(OS_ANDROID)
+#else
void ExternalPopupMenu::DidSelectItems(bool canceled,
const std::vector<int>& indices) {
if (!popup_menu_client_)
@@ -85,5 +84,6 @@
popup_menu_client_->didAcceptIndices(indices);
}
#endif
+#endif
} // namespace content