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_CONTEXT_MENU_CONTROLLER_H_
18 #define BROWSER_WRT_CONTEXT_MENU_CONTROLLER_H_
20 #include "tizen_src/chromium_impl/content/browser/context_menu/context_menu_controller_base.h"
21 #include "ui/gfx/geometry/rect.h"
31 class WRTContextMenuController
32 : public content::ContextMenuControllerBase {
34 explicit WRTContextMenuController(
35 content::WebContents& web_contents, WRTWebContents* wrt_web_contents);
36 virtual ~WRTContextMenuController() override {}
38 WRTContextMenuController(const WRTContextMenuController&) = delete;
39 WRTContextMenuController& operator=(const WRTContextMenuController&) = delete;
41 bool PopulateAndShowContextMenu(const content::ContextMenuParams& params);
44 // ContextMenuControllerBase
45 Evas_Object* ewk_view() override;
46 void MenuItemSelected(content::ContextMenuItemEfl* menu_item) override;
48 void AddItemToProposedList(Ewk_Context_Menu_Item_Type item,
49 Ewk_Context_Menu_Item_Tag option,
50 const std::string& title,
51 const std::string& image_url = std::string(),
52 const std::string& link_url = std::string(),
53 const std::string& icon_path = std::string());
54 void GetProposedContextMenu();
55 void SelectFocusedLink();
56 void GetSelectionRange(gfx::Rect* left, gfx::Rect* right);
57 void MoveCaret(const gfx::Point& point);
58 void EnterDragState();
60 WRTWebContents* wrt_web_contents_;
65 #endif // BROWSER_WRT_CONTEXT_MENU_CONTROLLER_H_