Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: athena/content/render_view_context_menu_impl.h

Issue 678653003: Remove Downcasting RVContextMenuBase in ContextMenuDeleagate implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove virtual keyword when override is specified Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | athena/content/render_view_context_menu_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_ 5 #ifndef ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_
6 #define ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_ 6 #define ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_
7 7
8 #include "components/renderer_context_menu/render_view_context_menu_base.h" 8 #include "components/renderer_context_menu/render_view_context_menu_base.h"
9 9
10 namespace views { 10 namespace aura {
11 class Widget; 11 class Window;
12 } 12 }
13 13
14 namespace gfx { 14 namespace gfx {
15 class Point; 15 class Point;
16 } 16 }
17 17
18 namespace views {
19 class Widget;
20 }
21
18 namespace athena { 22 namespace athena {
19 23
20 class RenderViewContextMenuImpl : public RenderViewContextMenuBase { 24 class RenderViewContextMenuImpl : public RenderViewContextMenuBase {
21 public: 25 public:
22 RenderViewContextMenuImpl(content::RenderFrameHost* render_frame_host, 26 RenderViewContextMenuImpl(content::RenderFrameHost* render_frame_host,
23 const content::ContextMenuParams& params); 27 const content::ContextMenuParams& params);
24 ~RenderViewContextMenuImpl() override; 28 ~RenderViewContextMenuImpl() override;
25 29
26 void RunMenuAt(views::Widget* parent, 30 void RunMenuAt(views::Widget* parent,
27 const gfx::Point& point, 31 const gfx::Point& point,
28 ui::MenuSourceType type); 32 ui::MenuSourceType type);
29 33
34 // RenderViewContextMenuBase:
35 void Show() override;
36
30 private: 37 private:
31 // RenderViewContextMenuBase: 38 // RenderViewContextMenuBase:
32 void InitMenu() override; 39 void InitMenu() override;
33 void RecordShownItem(int id) override; 40 void RecordShownItem(int id) override;
34 void RecordUsedItem(int id) override; 41 void RecordUsedItem(int id) override;
35 #if defined(ENABLE_PLUGINS) 42 #if defined(ENABLE_PLUGINS)
36 void HandleAuthorizeAllPlugins() override; 43 void HandleAuthorizeAllPlugins() override;
37 #endif 44 #endif
38 void NotifyMenuShown() override; 45 void NotifyMenuShown() override;
39 void NotifyURLOpened(const GURL& url, 46 void NotifyURLOpened(const GURL& url,
40 content::WebContents* new_contents) override; 47 content::WebContents* new_contents) override;
41 48
42 // ui::SimpleMenuModel: 49 // ui::SimpleMenuModel:
43 bool GetAcceleratorForCommandId(int command_id, 50 bool GetAcceleratorForCommandId(int command_id,
44 ui::Accelerator* accelerator) override; 51 ui::Accelerator* accelerator) override;
45 bool IsCommandIdChecked(int command_id) const override; 52 bool IsCommandIdChecked(int command_id) const override;
46 bool IsCommandIdEnabled(int command_id) const override; 53 bool IsCommandIdEnabled(int command_id) const override;
47 void ExecuteCommand(int command_id, int event_flags) override; 54 void ExecuteCommand(int command_id, int event_flags) override;
48 55
56 aura::Window* GetActiveNativeView();
57 views::Widget* GetTopLevelWidget();
58
49 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuImpl); 59 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuImpl);
50 }; 60 };
51 61
52 } // namespace athena 62 } // namespace athena
53 63
54 #endif // ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_ 64 #endif // ATHENA_CONTENT_RENDER_VIEW_CONTEXT_MENU_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | athena/content/render_view_context_menu_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698