Make EWK use WebContentsViewDelegate for popup menu handling.
[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 ShowPopupMenu(
23       content::RenderFrameHost* render_frame_host,
24       const gfx::Rect& bounds,
25       int item_height,
26       double item_font_size,
27       int selected_item,
28       const std::vector<content::MenuItem>& items,
29       bool right_aligned,
30       bool allow_multiple_selection) override;
31   void HidePopupMenu() override;
32
33  private:
34   EWebView* web_view_;
35 };
36
37 #endif // WEB_CONTENTS_VIEW_DELEGATE_EFL
38