Use WebcontentViewDelegate for show context menu
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / web_contents_view_delegate_ewk.cc
1 // Copyright 2015 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "web_contents_view_delegate_ewk.h"
6
7 #include "eweb_view.h"
8
9 WebContentsViewDelegateEwk::WebContentsViewDelegateEwk(EWebView* wv)
10     : web_view_(wv) {
11 }
12
13 void WebContentsViewDelegateEwk::ShowContextMenu(
14       content::RenderFrameHost* render_frame_host,
15       const content::ContextMenuParams& params) {
16   web_view_->ShowContextMenu(params);
17 }
18
19 void WebContentsViewDelegateEwk::ShowPopupMenu(
20       content::RenderFrameHost* render_frame_host,
21       const gfx::Rect& bounds,
22       int item_height,
23       double item_font_size,
24       int selected_item,
25       const std::vector<content::MenuItem>& items,
26       bool right_aligned,
27       bool allow_multiple_selection) {
28   web_view_->ShowPopupMenu(items, selected_item, allow_multiple_selection);
29 }
30
31 void WebContentsViewDelegateEwk::HidePopupMenu() {
32   web_view_->HidePopupMenu();
33 }