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

Side by Side Diff: chrome/browser/ui/gtk/tab_contents/render_view_context_menu_gtk.h

Issue 178193005: Move render_view_context_menu.* related files out of tab_contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: context_menu->renderer_context_menu for disambiguation Created 6 years, 9 months 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/tab_contents/render_view_context_menu.h"
11 #include "chrome/browser/ui/gtk/menu_gtk.h"
12 #include "ui/gfx/point.h"
13
14 namespace content {
15 class RenderWidgetHostView;
16 struct ContextMenuParams;
17 }
18
19 class RenderViewContextMenuGtk : public RenderViewContextMenu,
20 public MenuGtk::Delegate {
21 public:
22 RenderViewContextMenuGtk(content::RenderFrameHost* render_frame_host,
23 const content::ContextMenuParams& params,
24 content::RenderWidgetHostView* view);
25
26 virtual ~RenderViewContextMenuGtk();
27
28 // Show the menu at the given location.
29 void Popup(const gfx::Point& point);
30
31 // Menu::Delegate implementation ---------------------------------------------
32 virtual bool AlwaysShowIconForCmd(int command_id) const OVERRIDE;
33
34 // SimpleMenuModel::Delegate implementation.
35 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
36 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
37 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
38
39 // RenderViewContextMenuDelegate implementation ------------------------------
40 virtual void UpdateMenuItem(int command_id,
41 bool enabled,
42 bool hidden,
43 const base::string16& title) OVERRIDE;
44
45 protected:
46 // RenderViewContextMenu implementation --------------------------------------
47 virtual void PlatformInit() OVERRIDE;
48 virtual void PlatformCancel() OVERRIDE;
49 // TODO(port): implement.
50 virtual bool GetAcceleratorForCommandId(
51 int command_id,
52 ui::Accelerator* accelerator) OVERRIDE;
53 virtual void AppendPlatformEditableItems() OVERRIDE;
54
55 private:
56 // Adds writing direction submenu.
57 void AppendBidiSubMenu();
58
59 // Model for the BiDi input submenu.
60 ui::SimpleMenuModel bidi_submenu_model_;
61
62 scoped_ptr<MenuGtk> menu_gtk_;
63 uint32_t triggering_event_time_;
64 };
65
66 #endif // CHROME_BROWSER_UI_GTK_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698