2 * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef BROWSER_WRT_WEB_VIEW_DELEGATE_H_
18 #define BROWSER_WRT_WEB_VIEW_DELEGATE_H_
20 #include "tizen_src/chromium_impl/content/public/browser/webview_delegate.h"
21 #include "wrt/src/browser/wrt_input_picker.h"
27 class WRTWebViewDelegate : public content::WebViewDelegate {
29 WRTWebViewDelegate(WRTWebContents* web_contents);
30 ~WRTWebViewDelegate();
32 WRTWebViewDelegate(const WRTWebViewDelegate&) = delete;
33 WRTWebViewDelegate& operator=(const WRTWebViewDelegate&) = delete;
36 // content::WebViewDelegate
37 bool WebContentsCreateAsync(WebContentsCreateCallback) override {
41 void ShowPopupMenu(content::RenderFrameHost* render_frame_host,
42 const gfx::Rect& bounds,
44 double item_font_size,
46 std::vector<blink::mojom::MenuItemPtr> items,
48 bool allow_multiple_selection) override;
49 void HidePopupMenu() override;
50 void CancelContextMenu(int request_id) override;
51 void HandleZoomGesture(blink::WebGestureEvent& event) override;
52 bool UseKeyPadWithoutUserAction() override;
53 void ShowContextMenu(const content::ContextMenuParams& params) override;
54 void OrientationLock(device::mojom::ScreenOrientationLockType) override;
55 void OrientationUnlock() override;
56 void OpenDateTimeDialog(
57 ui::TextInputType dialog_type,
59 content::DateTimeChooserEfl* date_time_chooser) override;
60 void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
61 const gfx::Vector2dF& latest_overscroll_delta) override;
62 bool ImePanelEnabled() const override;
63 bool ImeHandleKeyEventEnabled() const override;
64 bool UseFloatingUI() const override;
66 WRTWebContents* wrt_web_contents_;
67 std::unique_ptr<WRTInputPicker> wrt_input_picker_;
72 #endif // BROWSER_WRT_WEB_VIEW_DELEGATE_H_