| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. 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 ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_ | |
| 6 #define ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_ | |
| 7 | |
| 8 #include "components/renderer_context_menu/render_view_context_menu_base.h" | |
| 9 | |
| 10 namespace aura { | |
| 11 class Window; | |
| 12 } | |
| 13 | |
| 14 namespace gfx { | |
| 15 class Point; | |
| 16 } | |
| 17 | |
| 18 namespace views { | |
| 19 class Widget; | |
| 20 } | |
| 21 | |
| 22 namespace athena { | |
| 23 | |
| 24 class RenderViewContextMenuImpl : public RenderViewContextMenuBase { | |
| 25 public: | |
| 26 RenderViewContextMenuImpl(content::RenderFrameHost* render_frame_host, | |
| 27 const content::ContextMenuParams& params); | |
| 28 ~RenderViewContextMenuImpl() override; | |
| 29 | |
| 30 void RunMenuAt(views::Widget* parent, | |
| 31 const gfx::Point& point, | |
| 32 ui::MenuSourceType type); | |
| 33 | |
| 34 // RenderViewContextMenuBase: | |
| 35 void Show() override; | |
| 36 | |
| 37 private: | |
| 38 // RenderViewContextMenuBase: | |
| 39 void InitMenu() override; | |
| 40 void RecordShownItem(int id) override; | |
| 41 void RecordUsedItem(int id) override; | |
| 42 #if defined(ENABLE_PLUGINS) | |
| 43 void HandleAuthorizeAllPlugins() override; | |
| 44 #endif | |
| 45 void NotifyMenuShown() override; | |
| 46 void NotifyURLOpened(const GURL& url, | |
| 47 content::WebContents* new_contents) override; | |
| 48 | |
| 49 // ui::SimpleMenuModel: | |
| 50 bool GetAcceleratorForCommandId(int command_id, | |
| 51 ui::Accelerator* accelerator) override; | |
| 52 bool IsCommandIdChecked(int command_id) const override; | |
| 53 bool IsCommandIdEnabled(int command_id) const override; | |
| 54 void ExecuteCommand(int command_id, int event_flags) override; | |
| 55 | |
| 56 aura::Window* GetActiveNativeView(); | |
| 57 views::Widget* GetTopLevelWidget(); | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuImpl); | |
| 60 }; | |
| 61 | |
| 62 } // namespace athena | |
| 63 | |
| 64 #endif // ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_ | |
| OLD | NEW |