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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

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/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 0b5465195bc22a59fcc9f91f4755056428176763..15b4665336520a308e913f3bc0c257da1e5db62b 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -83,9 +83,7 @@
#include "url/url_constants.h"
#include "webkit/browser/fileapi/isolated_context.h"
-#if defined(OS_MACOSX)
-#include "content/browser/renderer_host/popup_menu_helper_mac.h"
-#elif defined(OS_WIN)
+#if defined(OS_WIN)
#include "base/win/win_util.h"
#endif
@@ -905,10 +903,6 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
- IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnShowPopup)
- IPC_MESSAGE_HANDLER(ViewHostMsg_HidePopup, OnHidePopup)
-#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched)
// Have the super handle all other messages.
@@ -1300,29 +1294,6 @@ void RenderViewHostImpl::ForwardKeyboardEvent(
RenderWidgetHostImpl::ForwardKeyboardEvent(key_event);
}
-#if defined(OS_ANDROID)
-void RenderViewHostImpl::DidSelectPopupMenuItems(
- const std::vector<int>& selected_indices) {
- Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), false,
- selected_indices));
-}
-
-void RenderViewHostImpl::DidCancelPopupMenu() {
- Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), true,
- std::vector<int>()));
-}
-#endif
-
-#if defined(OS_MACOSX)
-void RenderViewHostImpl::DidSelectPopupMenuItem(int selected_index) {
- Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), selected_index));
-}
-
-void RenderViewHostImpl::DidCancelPopupMenu() {
- Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), -1));
-}
-#endif
-
bool RenderViewHostImpl::IsWaitingForUnloadACK() const {
return rvh_state_ == STATE_WAITING_FOR_CLOSE ||
rvh_state_ == STATE_PENDING_SHUTDOWN ||
@@ -1463,28 +1434,6 @@ void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) {
#endif
}
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
-void RenderViewHostImpl::OnShowPopup(
- const ViewHostMsg_ShowPopup_Params& params) {
- RenderViewHostDelegateView* view = delegate_->GetDelegateView();
- if (view) {
- view->ShowPopupMenu(params.bounds,
- params.item_height,
- params.item_font_size,
- params.selected_item,
- params.popup_items,
- params.right_aligned,
- params.allow_multiple_selection);
- }
-}
-
-void RenderViewHostImpl::OnHidePopup() {
- RenderViewHostDelegateView* view = delegate_->GetDelegateView();
- if (view)
- view->HidePopupMenu();
-}
-#endif
-
void RenderViewHostImpl::SetState(RenderViewHostImplState rvh_state) {
// We update the number of RenderViews in a SiteInstance when the
// swapped out status of this RenderView gets flipped to/from live.

Powered by Google App Engine
This is Rietveld 408576698