| Index: chrome/browser/renderer_host/render_view_host.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/render_view_host.cc (revision 63740)
|
| +++ chrome/browser/renderer_host/render_view_host.cc (working copy)
|
| @@ -894,6 +894,9 @@
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions,
|
| OnUpdateContentRestrictions)
|
| +#if defined(OS_MACOSX)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup)
|
| +#endif
|
| // Have the super handle all other messages.
|
| IPC_MESSAGE_UNHANDLED(RenderWidgetHost::OnMessageReceived(msg))
|
| IPC_END_MESSAGE_MAP_EX()
|
| @@ -2013,6 +2016,16 @@
|
| Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id(), flags));
|
| }
|
|
|
| +#if defined(OS_MACOSX)
|
| +void RenderViewHost::DidSelectPopupMenuItem(int selected_index) {
|
| + Send(new ViewMsg_SelectPopupMenuItem(routing_id(), selected_index));
|
| +}
|
| +
|
| +void RenderViewHost::DidCancelPopupMenu() {
|
| + Send(new ViewMsg_SelectPopupMenuItem(routing_id(), -1));
|
| +}
|
| +#endif
|
| +
|
| void RenderViewHost::OnExtensionPostMessage(
|
| int port_id, const std::string& message) {
|
| if (process()->profile()->GetExtensionMessageService()) {
|
| @@ -2143,3 +2156,18 @@
|
| void RenderViewHost::OnUpdateContentRestrictions(int restrictions) {
|
| delegate_->UpdateContentRestrictions(restrictions);
|
| }
|
| +
|
| +#if defined(OS_MACOSX)
|
| +void RenderViewHost::OnMsgShowPopup(
|
| + const ViewHostMsg_ShowPopup_Params& params) {
|
| + RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
|
| + if (view) {
|
| + view->ShowPopupMenu(params.bounds,
|
| + params.item_height,
|
| + params.item_font_size,
|
| + params.selected_item,
|
| + params.popup_items,
|
| + params.right_aligned);
|
| + }
|
| +}
|
| +#endif
|
|
|