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_CONTENTS_VIEW_DELEGATE_H_
18 #define BROWSER_WRT_WEB_CONTENTS_VIEW_DELEGATE_H_
20 #include "content/public/browser/web_contents_view_delegate.h"
21 #include "ui/gfx/geometry/rect.h"
29 class WRTWebContentsViewDelegate : public content::WebContentsViewDelegate {
31 explicit WRTWebContentsViewDelegate(content::WebContents* web_contents);
32 ~WRTWebContentsViewDelegate();
34 WRTWebContentsViewDelegate(const WRTWebContentsViewDelegate&) = delete;
35 WRTWebContentsViewDelegate& operator=(const WRTWebContentsViewDelegate&)
39 // content::WebContentsViewDelegate
40 bool Focus() override;
41 void ShowContextMenu(content::RenderFrameHost& render_frame_host,
42 const content::ContextMenuParams& params) override;
43 void OnSelectionRectReceived(const gfx::Rect& selection_rect) const override;
45 content::WebContents* web_contents_;
50 #endif // BROWSER_WRT_WEB_CONTENTS_VIEW_DELEGATE_H_