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 CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ 6#define CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ 7 8#include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 9#include "ui/base/ui_base_types.h" 10 11namespace gfx { 12class Point; 13} 14 15namespace views { 16class Widget; 17} 18 19class RenderViewContextMenuViews : public RenderViewContextMenu { 20 public: 21 virtual ~RenderViewContextMenuViews(); 22 23 // Factory function to create an instance. 24 static RenderViewContextMenuViews* Create( 25 content::RenderFrameHost* render_frame_host, 26 const content::ContextMenuParams& params); 27 28 void RunMenuAt(views::Widget* parent, 29 const gfx::Point& point, 30 ui::MenuSourceType type); 31 32 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; 33 34 protected: 35 RenderViewContextMenuViews(content::RenderFrameHost* render_frame_host, 36 const content::ContextMenuParams& params); 37 38 // RenderViewContextMenu implementation. 39 virtual bool GetAcceleratorForCommandId( 40 int command_id, 41 ui::Accelerator* accelerator) OVERRIDE; 42 43 private: 44 virtual void AppendPlatformEditableItems() OVERRIDE; 45 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 46 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 47 48 // Model for the BiDi input submenu. 49 ui::SimpleMenuModel bidi_submenu_model_; 50 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuViews); 51}; 52 53#endif // CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ 54