Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / views / tab_contents / render_view_context_menu_views.h
blob450e6c463d5682232923f9bae2fc6d1082276a9c
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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h"
10 #include "base/strings/string16.h"
11 #include "chrome/browser/tab_contents/render_view_context_menu.h"
12 #include "ui/base/ui_base_types.h"
14 namespace gfx {
15 class Point;
18 namespace views {
19 class MenuRunner;
20 class Widget;
23 class RenderViewContextMenuViews : public RenderViewContextMenu {
24 public:
25 virtual ~RenderViewContextMenuViews();
27 // Factory function to create an instance.
28 static RenderViewContextMenuViews* Create(
29 content::WebContents* web_contents,
30 const content::ContextMenuParams& params);
32 void RunMenuAt(views::Widget* parent,
33 const gfx::Point& point,
34 ui::MenuSourceType type);
36 // RenderViewContextMenuDelegate implementation.
37 virtual void UpdateMenuItem(int command_id,
38 bool enabled,
39 bool hidden,
40 const base::string16& title) OVERRIDE;
42 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
44 protected:
45 RenderViewContextMenuViews(content::WebContents* web_contents,
46 const content::ContextMenuParams& params);
48 // RenderViewContextMenu implementation.
49 virtual void PlatformInit() OVERRIDE;
50 virtual void PlatformCancel() OVERRIDE;
51 virtual bool GetAcceleratorForCommandId(
52 int command_id,
53 ui::Accelerator* accelerator) OVERRIDE;
55 private:
56 virtual void AppendPlatformEditableItems() OVERRIDE;
57 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
58 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
60 // Model for the BiDi input submenu.
61 ui::SimpleMenuModel bidi_submenu_model_;
63 scoped_ptr<views::MenuRunner> menu_runner_;
65 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuViews);
68 #endif // CHROME_BROWSER_UI_VIEWS_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_