Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index e01306b0e421bdcee5d147f4d81dbb7d464c3fd0..612fc59ff8b283cbb988e42110e7476f96f8107f 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -1390,7 +1390,7 @@ bool RenderFrameImpl::Send(IPC::Message* message) { |
return RenderThread::Get()->Send(message); |
} |
-#if defined(OS_MACOSX) || defined(OS_ANDROID) |
+#if defined(USE_EXTERNAL_POPUP_MENU) |
void RenderFrameImpl::DidHideExternalPopupMenu() { |
// We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close |
// is called. Otherwise, createExternalPopupMenu() for new popup will fail. |
@@ -1504,9 +1504,17 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, |
OnActivateNearestFindResult) |
IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) |
- IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) |
-#elif defined(OS_MACOSX) |
+#endif |
+ |
+#if defined(USE_EXTERNAL_POPUP_MENU) |
+#if defined(OS_MACOSX) |
IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) |
+#else |
+ IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) |
+#endif |
+#endif |
+ |
+#if defined(OS_MACOSX) |
IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) |
#endif |
IPC_END_MESSAGE_MAP() |
@@ -2595,7 +2603,7 @@ RenderFrameImpl::createWorkerContentSettingsClientProxy() { |
WebExternalPopupMenu* RenderFrameImpl::createExternalPopupMenu( |
const WebPopupMenuInfo& popup_menu_info, |
WebExternalPopupMenuClient* popup_menu_client) { |
-#if defined(OS_MACOSX) || defined(OS_ANDROID) |
+#if defined(USE_EXTERNAL_POPUP_MENU) |
// An IPC message is sent to the browser to build and display the actual |
// popup. The user could have time to click a different select by the time |
// the popup is shown. In that case external_popup_menu_ is non NULL. |
@@ -5229,7 +5237,17 @@ void RenderFrameImpl::OnFindMatchRects(int current_version) { |
Send(new FrameHostMsg_FindMatchRects_Reply(routing_id_, rects_version, |
match_rects, active_rect)); |
} |
+#endif |
+#if defined(USE_EXTERNAL_POPUP_MENU) |
+#if defined(OS_MACOSX) |
+void RenderFrameImpl::OnSelectPopupMenuItem(int selected_index) { |
+ if (external_popup_menu_ == NULL) |
+ return; |
+ external_popup_menu_->DidSelectItem(selected_index); |
+ external_popup_menu_.reset(); |
+} |
+#else |
void RenderFrameImpl::OnSelectPopupMenuItems( |
bool canceled, |
const std::vector<int>& selected_indices) { |
@@ -5243,13 +5261,7 @@ void RenderFrameImpl::OnSelectPopupMenuItems( |
external_popup_menu_->DidSelectItems(canceled, selected_indices); |
external_popup_menu_.reset(); |
} |
-#elif defined(OS_MACOSX) |
-void RenderFrameImpl::OnSelectPopupMenuItem(int selected_index) { |
- if (external_popup_menu_ == NULL) |
- return; |
- external_popup_menu_->DidSelectItem(selected_index); |
- external_popup_menu_.reset(); |
-} |
+#endif |
#endif |
void RenderFrameImpl::OpenURL(const GURL& url, |