Use WebcontentViewDelegate for show context menu
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / web_contents_view_delegate_ewk.h
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 #ifndef WEB_CONTENTS_VIEW_DELEGATE_EFL
6 #define WEB_CONTENTS_VIEW_DELEGATE_EFL
7
8 #include "content/public/browser/web_contents_view_delegate.h"
9
10 #include "content/public/common/menu_item.h"
11
12 class EWebView;
13
14 namespace content {
15 class RenderFrameHost;
16 }
17
18 class WebContentsViewDelegateEwk : public content::WebContentsViewDelegate {
19  public:
20   WebContentsViewDelegateEwk(EWebView*);
21
22   void ShowContextMenu(
23       content::RenderFrameHost* render_frame_host,
24       const content::ContextMenuParams& params) override;
25   void ShowPopupMenu(
26       content::RenderFrameHost* render_frame_host,
27       const gfx::Rect& bounds,
28       int item_height,
29       double item_font_size,
30       int selected_item,
31       const std::vector<content::MenuItem>& items,
32       bool right_aligned,
33       bool allow_multiple_selection) override;
34   void HidePopupMenu() override;
35
36  private:
37   EWebView* web_view_;
38 };
39
40 #endif // WEB_CONTENTS_VIEW_DELEGATE_EFL
41